/* ============================================
   NIVEAU 24 — L'ARCHITECTURE CSS
   Styles spécifiques au chapitre
   ============================================ */

/* ---------- COMPARAISON MÉTHODOLOGIES ---------- */
.method-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .method-compare { grid-template-columns: 1fr; }
}

.method-card {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.method-card-header {
  padding: 1rem 1.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: 1px solid #e2e8f0;
}

.method-bem .method-card-header { background: #eff6ff; color: #1e40af; }
.method-smacss .method-card-header { background: #f0fdf4; color: #166534; }
.method-itcss .method-card-header { background: #faf5ff; color: #7e22ce; }
.method-oocss .method-card-header { background: #fff7ed; color: #c2410c; }
.method-cube .method-card-header { background: #fef2f2; color: #b91c1c; }
.method-atomic .method-card-header { background: #f0f9ff; color: #0369a1; }

.method-card-body {
  padding: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.method-card-body ul {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
}

.method-card-body li {
  margin-bottom: 0.3rem;
}

/* ---------- BEM DÉMO ---------- */
.bem-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .bem-demo { grid-template-columns: 1fr; }
}

.bem-preview {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  background: #f8fafc;
}

.bem-card { font-family: 'Segoe UI', sans-serif; }
.bem-card__header {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1e293b;
}
.bem-card__body { color: #475569; margin-bottom: 1rem; line-height: 1.6; }
.bem-card__footer { display: flex; gap: 0.5rem; }

.bem-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.bem-btn--primary {
  background: #2563eb;
  color: white;
}
.bem-btn--primary:hover { background: #1d4ed8; }
.bem-btn--outline {
  background: transparent;
  color: #2563eb;
  border: 2px solid #2563eb;
}
.bem-btn--outline:hover { background: #eff6ff; }
.bem-btn--danger {
  background: #dc2626;
  color: white;
}
.bem-btn--danger:hover { background: #b91c1c; }
.bem-btn--small {
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
}

/* ---------- STRUCTURE FICHIERS ---------- */
.file-tree {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  overflow-x: auto;
  margin-top: 1rem;
}

.file-tree .folder { color: #60a5fa; }
.file-tree .file { color: #a5b4fc; }
.file-tree .comment { color: #64748b; font-style: italic; }

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

.naming-rule {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
  background: white;
}

.naming-rule code {
  display: block;
  background: #f1f5f9;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #1e293b;
}

.naming-rule .do { color: #16a34a; font-weight: 600; }
.naming-rule .dont { color: #dc2626; font-weight: 600; }

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

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

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

.method-table tr:hover td { background: #f8fafc; }

.method-table .check { color: #16a34a; font-weight: 700; }
.method-table .cross { color: #dc2626; }
.method-table .partial { color: #f59e0b; }

/* ---------- PROJET DÉMO ---------- */
.project-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  min-height: 300px;
}

@media (max-width: 768px) {
  .project-layout { grid-template-columns: 1fr; }
}

.project-sidebar {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
}

.project-sidebar-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  transition: all 0.15s;
}

.project-sidebar-nav a:hover,
.project-sidebar-nav a.active {
  background: rgba(255,255,255,0.1);
  color: white;
}

.project-main {
  padding: 2rem;
  background: #f8fafc;
}

.project-main h3 {
  margin-top: 0;
  color: #1e293b;
}

/* ---------- ITCSS LAYERS ---------- */
.itcss-layers {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1rem;
}

.itcss-layer {
  padding: 1rem 1.5rem;
  border-left: 4px solid;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.itcss-layer:nth-child(1) { background: #fef2f2; border-color: #dc2626; }
.itcss-layer:nth-child(2) { background: #fff7ed; border-color: #ea580c; }
.itcss-layer:nth-child(3) { background: #fefce8; border-color: #ca8a04; }
.itcss-layer:nth-child(4) { background: #f0fdf4; border-color: #16a34a; }
.itcss-layer:nth-child(5) { background: #ecfeff; border-color: #0891b2; }
.itcss-layer:nth-child(6) { background: #eff6ff; border-color: #2563eb; }
.itcss-layer:nth-child(7) { background: #f5f3ff; border-color: #7c3aed; }

.itcss-layer strong { font-weight: 700; }
.itcss-layer span { color: #64748b; font-size: 0.8rem; }
