/* ── Page schémas d'architecture ─────────────────────────────── */

.sch-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 2rem 4rem;
  flex: 1;
}

/* Hero */
.sch-hero { max-width: 720px; margin-bottom: 2.5rem; }
.sch-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.15;
  margin: 0.6rem 0 0.8rem;
}
.sch-sub { font-size: 15.5px; color: var(--text2); line-height: 1.65; }

/* Légende */
.sch-legend {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 12px 16px;
  margin-bottom: 2.5rem;
}
.sch-legend-item {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text2);
}
.sch-sw {
  width: 22px; height: 14px; border-radius: 3px;
  border: 1px solid var(--border2); background: var(--bg2);
  flex-shrink: 0;
}
.sch-sw--blue  { background: var(--blue-bg);  border-color: var(--blue-bd); }
.sch-sw--green { background: var(--green-bg); border-color: var(--green-bd); }
.sch-sw--amber { background: var(--amber-bg); border-color: var(--amber-bd); }

/* Mention de généralisation */
.sch-disclaimer {
  max-width: 760px;
  margin: -1rem 0 2.5rem;
  padding: 10px 14px;
  background: var(--bg3);
  border-left: 2px solid var(--border2);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 12.5px; color: var(--text2); line-height: 1.55;
}

/* Retour au projet / lien vers l'index */
.sch-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--text2); text-decoration: none;
  margin-bottom: 1.8rem; transition: color 0.15s, gap 0.2s;
}
.sch-back::before { content: "←"; }
.sch-back:hover { color: var(--text); gap: 10px; }

.sch-more { margin-top: 0.5rem; font-size: 13.5px; }
.sch-more a { color: var(--text2); text-decoration: none; border-bottom: 1px solid var(--border2); padding-bottom: 1px; }
.sch-more a:hover { color: var(--text); border-color: var(--text3); }

/* Index des schémas */
.sch-group { margin-bottom: 3.5rem; }
.sch-group-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 1.2rem; }
.sch-group-head .section-label { margin: 0; }
.sch-group-count { font-size: 12.5px; color: var(--text3); }
.sch-index { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sch-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--r3);
  padding: 1.4rem; background: var(--bg2);
  text-decoration: none; color: inherit;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.2s ease;
}
.sch-card:hover { transform: translateY(-6px); border-color: var(--border2); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }
@media (prefers-reduced-motion: reduce) { .sch-card:hover { transform: none; } }
.sch-card-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text3);
}
.sch-card h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin: 7px 0 8px; }
.sch-card p { font-size: 13.5px; color: var(--text2); line-height: 1.55; flex: 1; }
.sch-card-go {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 1.1rem;
  font-family: 'DM Mono', monospace; font-size: 12.5px; font-weight: 500; color: var(--text);
  transition: gap 0.2s;
}
.sch-card:hover .sch-card-go { gap: 10px; }
@media (max-width: 900px) { .sch-index { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .sch-index { grid-template-columns: 1fr; } }

/* Bloc projet */
.sch-item { margin-bottom: 4rem; }
.sch-item-head { margin-bottom: 1.2rem; }
.sch-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text3);
}
.sch-item h2 {
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
  margin: 4px 0 6px;
}
.sch-claim { font-size: 14.5px; color: var(--text2); max-width: 760px; line-height: 1.6; }

/* Figure */
.sch-fig {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 20px 20px 16px;
}
.sch-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sch-fig svg {
  display: block;
  width: 100%;
  min-width: 900px;
  height: auto;
  color: var(--text2);            /* couleur héritée par les flèches/marqueurs */
  font-family: 'DM Sans', sans-serif;
}
.sch-fig figcaption {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text2); line-height: 1.55;
}

/* Pied de bloc : tags + lien */
.sch-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 14px;
}
.sch-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sch-tags span {
  font-family: 'DM Mono', monospace;
  font-size: 11px; color: var(--text2);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 10px;
}
.sch-link {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500; color: var(--text);
  text-decoration: none;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 999px; padding: 6px 14px;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.sch-link svg { width: 15px; height: 15px; min-width: 0; }
.sch-link:hover { background: var(--bg3); border-color: var(--text3); transform: translateY(-1px); }

/* ── Primitives SVG partagées ───────────────────────────────── */
.sc-box   { fill: var(--bg2); stroke: var(--border2); stroke-width: 1.2; }
.sc-box--blue  { fill: var(--blue-bg);  stroke: var(--blue-bd); }
.sc-box--green { fill: var(--green-bg); stroke: var(--green-bd); }
.sc-box--amber { fill: var(--amber-bg); stroke: var(--amber-bd); }

.sc-zone  { fill: none; stroke: var(--amber); stroke-width: 2; }
.sc-panel { fill: var(--bg); stroke: var(--border); stroke-width: 1; }

.sc-t { font-size: 13px; font-weight: 500; fill: var(--text); text-anchor: middle; }
.sc-s { font-size: 11px; fill: var(--text2); text-anchor: middle; }
.sc-lbl { font-size: 11px; fill: var(--text2); text-anchor: middle; }

.sc-zone-lbl {
  font-family: 'DM Mono', monospace;
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  fill: var(--amber);
}
.sc-panel-lbl {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  fill: var(--text3);
}

.sc-line { stroke: var(--text2); stroke-width: 1.3; fill: none; }
.sc-line--dash { stroke: var(--text3); stroke-width: 1.3; fill: none; stroke-dasharray: 5 4; }

/* ── Extensions : schémas denses (missions) ─────────────────── */
:root {
  --red:     #A6382B;
  --red-bg:  #FBEEEC;
  --red-bd:  #EEBDB4;
  --violet:    #5B3E9B;
  --violet-bg: #F1EDFA;
  --violet-bd: #CDBFEC;
}

.sch-wrap--wide { max-width: 1560px; }
.sch-wrap--wide .sch-fig svg { min-width: 1100px; }

.sc-box--red    { fill: var(--red-bg);    stroke: var(--red-bd); }
.sc-box--violet { fill: var(--violet-bg); stroke: var(--violet-bd); }
.sc-box--dash   { stroke-dasharray: 6 4; }

.sc-mono   { font-family: 'DM Mono', monospace; font-size: 11.5px; fill: var(--text); }
.sc-mono-s { font-family: 'DM Mono', monospace; font-size: 11px; fill: var(--text2); }
.sc-note   { font-size: 11.5px; fill: var(--text3); }
.sc-metric { font-size: 19px; font-weight: 600; fill: var(--text); }

/* modificateurs d'alignement (le CSS l'emporte sur text-anchor en attribut) */
.sch-fig .l { text-anchor: start; }
.sch-fig .c { text-anchor: middle; }
.sch-fig .r { text-anchor: end; }

/* identités fournisseur (texte SVG) */
.sch-fig .aws { fill: var(--amber); }
.sch-fig .gcp { fill: var(--blue); }
.sch-fig .scw { fill: var(--violet); }

.sc-num   { fill: var(--text); }
.sc-num-t { font-size: 11px; font-weight: 600; fill: var(--bg2); text-anchor: middle; }

.sc-hr { stroke: var(--border); stroke-width: 1; }

/* Rangée de mesures (stat tiles) */
.sch-stats {
  display: flex; flex-wrap: wrap; gap: 8px 40px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.sch-stat { min-width: 92px; }
.sch-stat b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.sch-stat span { display: block; font-size: 11.5px; color: var(--text2); line-height: 1.35; }

/* Tableau (matrice de parité) */
.sch-table { overflow-x: auto; }
.sch-table table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 13.5px; }
.sch-table th, .sch-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.sch-table thead th { font-size: 12px; font-weight: 500; color: var(--text2); border-bottom: 1px solid var(--border2); }
.sch-table tbody th { font-weight: 500; color: var(--text); width: 220px; }
.sch-table td { color: var(--text2); }
.sch-table tbody tr:last-child th, .sch-table tbody tr:last-child td { border-bottom: none; }
.th-aws { color: var(--amber); }
.th-gcp { color: var(--blue); }
.th-scw { color: var(--violet); }

@media (max-width: 640px) {
  .sch-wrap { padding: 2.5rem 1.2rem 3rem; }
  .sch-fig { padding: 14px 14px 12px; }
  .sch-link { margin-left: 0; }
}
