/* ============================================
   NIVEAU 29 — LE DÉBOGAGE AVEC LES DEVTOOLS
   Styles spécifiques au chapitre
   ============================================ */

/* ---------- DEVTOOLS SHORTCUT GRID ---------- */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.shortcut-key {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  flex-shrink: 0;
}

.shortcut-desc {
  font-size: 0.85rem;
  color: #475569;
}

/* ---------- PANEL DESCRIPTION GRID ---------- */
.panels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.panel-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
}

.panel-card h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.panel-card .panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #eff6ff;
  border-radius: 6px;
  font-size: 0.8rem;
}

.panel-card ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: #475569;
}

.panel-card ul li {
  margin-bottom: 0.25rem;
}

/* ---------- DEBUGGING WORKFLOW ---------- */
.workflow-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.workflow-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.workflow-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #2563eb;
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.workflow-step-content {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
}

.workflow-step-content h4 {
  margin-bottom: 0.25rem;
}

.workflow-step-content p {
  margin: 0;
  font-size: 0.9rem;
  color: #475569;
}

/* ---------- BOX MODEL VISUALIZER ---------- */
.box-model-demo {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.box-model-visual {
  display: grid;
  grid-template-columns: 60px 80px 60px;
  grid-template-rows: 30px 60px 30px;
  gap: 0;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.75rem;
  text-align: center;
  max-width: 300px;
  width: 100%;
}

.bm-margin {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}

.bm-border {
  background: #fed7aa;
  border: 1px solid #fb923c;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}

.bm-padding {
  background: #bfdbfe;
  border: 1px solid #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}

.bm-content {
  background: #e2e8f0;
  border: 1px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}

/* ---------- FLEXBOX INSPECTOR DEMO ---------- */
.flex-inspector-demo {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.flex-container-demo {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #eff6ff;
  border: 2px dashed #93c5fd;
  border-radius: 8px;
  min-width: 200px;
  flex-wrap: wrap;
}

.flex-item-demo {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-radius: 6px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

/* ---------- GRID INSPECTOR DEMO ---------- */
.grid-inspector-demo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 80px);
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f0fdf4;
  border: 2px dashed #86efac;
  border-radius: 8px;
}

.grid-cell-demo {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  border-radius: 6px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

/* ---------- RESPONSIVE DEMO ---------- */
.responsive-demo-frame {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 1rem;
  max-width: 375px;
  background: white;
}

.responsive-demo-frame .frame-header {
  background: #1e293b;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.responsive-demo-frame .frame-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.responsive-demo-frame .frame-content {
  padding: 1rem;
  font-size: 0.85rem;
  color: #475569;
}

/* ---------- CSS ISSUES GRID ---------- */
.issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.issue-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
}

.issue-card h4 {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #dc2626;
}

.issue-card .cause {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.issue-card .fix {
  font-size: 0.85rem;
  color: #16a34a;
  font-weight: 600;
}

/* ---------- CHEAT SHEET TABLE ---------- */
.cheat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 1rem;
}

.cheat-table th {
  background: #f1f5f9;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid #e2e8f0;
}

.cheat-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.cheat-table td:first-child {
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .panels-grid { grid-template-columns: 1fr; }
  .shortcuts-grid { grid-template-columns: 1fr; }
  .issues-grid { grid-template-columns: 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
  .flex-inspector-demo { flex-direction: column; }
}
