/* ============================================================
   CSS commun aux hubs trading.html + templates.html (#5 audit)
   Source unique — toute modif ici impacte LES DEUX pages.
   ============================================================ */
:root {
  --s-bg-sunk:   #050608;
  --s-surface:   #14171e;
  --s-surface-2: #1c2029;
  --s-surface-3: #232732;
  --s-ink:       #e8ecf2;
  --s-ink-2:     #c8d0dc;
  --s-ink-3:     #8a92a0;
  --s-ink-4:     #6d7585;
  --s-line:      rgba(160,175,200,0.06);
  --s-line-2:    rgba(160,175,200,0.14);
  --s-highlight-top:    rgba(255,255,255,0.04);
  --s-highlight-strong: rgba(255,255,255,0.06);
  --s-shadow-card:   inset 0 1px 0 var(--s-highlight-top), 0 1px 0 #060709, 0 8px 24px rgba(0,0,0,0.35);
  --s-shadow-hover:  inset 0 1px 0 var(--s-highlight-strong), 0 1px 0 #060709, 0 14px 36px rgba(0,0,0,0.5);
  --s-shadow-flush:  inset 0 1px 0 var(--s-highlight-top);
  --s-pos:       #22c55e;
  --s-pos-soft:  rgba(34,197,94,0.14);
  --s-pos-glow:  rgba(34,197,94,0.30);
  --s-radius:    14px;
  --s-radius-sm: 10px;
  --s-radius-xs: 6px;
}
main.tools-hub *, main.tools-hub *::before, main.tools-hub *::after { box-sizing: border-box }
body { padding-top: 80px }
main.tools-hub {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px 96px;
  font-family: 'Roboto', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1;
}
.th-hero {
  text-align: center;
  padding: 36px 12px 36px;
  animation: thFadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.1s both;
}
.th-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 3.8vw, 2.7rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--s-ink);
}
.th-hero h1 em {
  font-style: normal;
  background: linear-gradient(180deg, var(--s-ink-2), #a0afc8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.th-hero p {
  font-size: 1.02rem;
  color: var(--s-ink-3);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.65;
}
@keyframes thFadeUp {
  from { opacity: 0; transform: translateY(8px) }
  to   { opacity: 1; transform: translateY(0) }
}
.th-spotlight {
  margin-top: 24px;
  background: var(--s-surface);
  border-radius: var(--s-radius);
  box-shadow:
    inset 0 1px 0 var(--s-highlight-strong),
    0 1px 0 #060709,
    0 14px 36px rgba(0,0,0,0.5);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  display: block;
  transition: transform 220ms cubic-bezier(0.22,1,0.36,1),
              box-shadow 220ms cubic-bezier(0.22,1,0.36,1);
  animation: thFadeUp 0.6s cubic-bezier(0.22,1,0.36,1) 0.2s both;
}
.th-spotlight:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 var(--s-highlight-strong),
    0 1px 0 #060709,
    0 18px 44px rgba(0,0,0,0.6);
}
.th-spotlight:focus-visible { outline: 2px solid var(--s-ink-2); outline-offset: 3px }
.th-sp-head {
  padding: 22px 24px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(34,197,94,0.07), transparent 60%),
    var(--s-bg-sunk);
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.4),
    inset 0 -1px 0 rgba(0,0,0,0.5);
}
.th-sp-id { display: flex; align-items: center; gap: 14px; min-width: 0 }
.th-sp-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--s-surface-2);
  border-radius: var(--s-radius-sm);
  box-shadow: var(--s-shadow-flush);
  color: var(--s-ink-2);
  flex-shrink: 0;
}
.th-sp-icon svg { width: 22px; height: 22px }
.th-sp-id-text { min-width: 0 }
.th-sp-cat {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--s-ink-4);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.th-sp-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--s-ink);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0;
}
.th-sp-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; flex-shrink: 0 }
.th-tag {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--s-ink-2);
  padding: 4px 9px;
  background: var(--s-surface-3);
  border-radius: 999px;
  box-shadow: var(--s-shadow-flush);
}
.th-tag.is-live {
  color: var(--s-pos);
  background: var(--s-pos-soft);
  box-shadow: inset 0 0 0 1px rgba(34,197,94,0.22);
  display: inline-flex; align-items: center; gap: 5px;
}
.th-tag.is-live::before {
  content:''; width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--s-pos);
  box-shadow: 0 0 6px var(--s-pos-glow);
}
@media (prefers-reduced-motion: no-preference) {
  .th-tag.is-live::before { animation: thLivePulse 1.8s cubic-bezier(0.4,0,0.6,1) infinite }
}
@keyframes thLivePulse {
  0%,100% { opacity: 1; transform: scale(1) }
  50%     { opacity: 0.55; transform: scale(0.85) }
}
.th-tag.is-soon {
  color: var(--s-ink-3);
  background: rgba(160,175,200,0.08);
  box-shadow: inset 0 0 0 1px rgba(160,175,200,0.16);
}
.th-sp-desc {
  padding: 18px 24px;
  margin: 0;
  font-size: 0.95rem;
  color: var(--s-ink-2);
  line-height: 1.55;
  position: relative;
}
.th-sp-desc::after {
  content: '';
  position: absolute;
  left: 24px; right: 24px; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--s-line) 20%, var(--s-line) 80%, transparent);
}
.th-sp-visual {
  padding: 22px 24px;
  background: var(--s-surface-2);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.02),
    inset 0 -1px 0 rgba(0,0,0,0.3);
  position: relative;
}
.th-sp-visual::after {
  content: '';
  position: absolute;
  left: 24px; right: 24px; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--s-line-2) 12%, var(--s-line-2) 88%, transparent);
}
.th-sp-visual-cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.th-sp-visual-cap-lbl { color: var(--s-ink-4); font-weight: 600 }
.th-sp-visual-cap-sub { color: var(--s-ink-3); font-weight: 500; font-variant-numeric: tabular-nums }
.th-ribbon { width: 100%; height: 88px; display: block }
.th-ribbon .tr-lane-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--s-ink-4);
}
.th-ribbon .tr-axis { stroke: var(--s-line-2); stroke-width: 1 }
.th-ribbon .tr-tick { fill: var(--s-ink-3) }
.th-ribbon .tr-tick.win { fill: var(--s-pos) }
.th-sp-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 0;
  padding: 16px 24px;
  background: rgba(255,255,255,0.012);
  position: relative;
}
.th-sp-stats::after {
  content: '';
  position: absolute;
  left: 24px; right: 24px; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--s-line) 20%, var(--s-line) 80%, transparent);
}
.th-stat {
  display: flex; flex-direction: column; gap: 3px;
  position: relative;
  padding: 0 14px;
}
.th-stat + .th-stat::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 1px;
  background: var(--s-line);
}
.th-stat-label {
  font-size: 0.62rem;
  color: var(--s-ink-4);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-weight: 600;
}
.th-stat-value {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--s-ink);
}
.th-stat-value.is-pos { color: var(--s-pos) }
.th-stat-value.is-muted { color: var(--s-ink-3) }
.th-sp-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px 22px;
  background: var(--s-surface);
}
.th-cta-text {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--s-ink-2);
  letter-spacing: 0.01em;
  transition: color 180ms;
}
.th-spotlight:hover .th-cta-text { color: var(--s-ink) }
.th-cta-arrow {
  display: inline-flex;
  width: 32px; height: 32px;
  align-items: center; justify-content: center;
  background: var(--s-surface-3);
  border-radius: 50%;
  color: var(--s-ink-3);
  transition: background 180ms, color 180ms, transform 180ms cubic-bezier(0.22,1,0.36,1);
  box-shadow: var(--s-shadow-flush);
}
.th-cta-arrow svg { width: 15px; height: 15px }
.th-spotlight:hover .th-cta-arrow {
  background: var(--s-ink-2);
  color: var(--s-bg-sunk);
  transform: translateX(2px);
}
.th-break {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 44px 4px 18px;
}
.th-break-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--s-ink-4);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  white-space: nowrap;
}
.th-break-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--s-line-2), transparent);
}
.th-break-count {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--s-ink-4);
  font-variant-numeric: tabular-nums;
}
.th-teaser-list { display: flex; flex-direction: column; gap: 10px }
.th-teaser {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: var(--s-surface);
  border-radius: var(--s-radius);
  box-shadow: var(--s-shadow-card);
  cursor: default;
  transition: background 200ms cubic-bezier(0.22,1,0.36,1),
              box-shadow 200ms cubic-bezier(0.22,1,0.36,1);
  animation: thFadeUp 0.5s cubic-bezier(0.22,1,0.36,1) 0.3s both;
}
.th-teaser:hover {
  background: var(--s-surface-2);
}
.th-tz-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--s-surface-2);
  border-radius: var(--s-radius-sm);
  box-shadow: var(--s-shadow-flush);
  color: var(--s-ink-3);
  flex-shrink: 0;
}
.th-tz-icon svg { width: 16px; height: 16px }
.th-tz-text { min-width: 0 }
.th-tz-cat {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--s-ink-4);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.th-tz-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--s-ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 4px;
}
.th-tz-desc {
  font-size: 0.85rem;
  color: var(--s-ink-3);
  line-height: 1.45;
  margin: 0;
}
.th-tz-status {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--s-ink-3);
  padding: 5px 10px;
  background: rgba(160,175,200,0.08);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(160,175,200,0.16);
  white-space: nowrap;
}
.th-templates { animation: thFadeUp 0.5s cubic-bezier(0.22,1,0.36,1) 0.25s both; }
.th-tpl-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; margin-bottom: 16px;
}
.th-tpl-head-text { min-width: 0 }
.th-tpl-title {
  font-size: 1.35rem; font-weight: 800; color: var(--s-ink);
  letter-spacing: -0.02em; line-height: 1.15; margin: 2px 0 6px;
}
.th-tpl-sub {
  font-size: 0.88rem; color: var(--s-ink-3); line-height: 1.5;
  margin: 0; max-width: 56ch;
}
.th-tpl-guide {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 9px 15px;
  background: var(--s-surface); border-radius: 999px;
  box-shadow: var(--s-shadow-card);
  font-size: 0.82rem; font-weight: 600; color: var(--s-ink-2);
  text-decoration: none; white-space: nowrap;
  transition: background 180ms, color 180ms, transform 180ms cubic-bezier(0.22,1,0.36,1);
}
.th-tpl-guide:hover { background: var(--s-surface-2); color: var(--s-ink); transform: translateY(-1px) }
.th-tpl-guide svg { width: 15px; height: 15px; flex-shrink: 0 }
.th-tpl-guide .thg-arrow { width: 13px; height: 13px; color: var(--s-ink-3) }
.th-tpl-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.th-tpl-card {
  display: flex; flex-direction: column; gap: 9px;
  padding: 18px 18px 16px;
  background: var(--s-surface); border-radius: var(--s-radius);
  box-shadow: var(--s-shadow-card);
  text-decoration: none;
  transition: background 200ms cubic-bezier(0.22,1,0.36,1),
              transform 200ms cubic-bezier(0.22,1,0.36,1);
}
.th-tpl-card:hover { background: var(--s-surface-2); transform: translateY(-2px) }
.th-tpl-card.is-featured { grid-column: 1 / -1; }
.th-tpl-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.th-tpl-icon {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  background: var(--s-surface-2); border-radius: var(--s-radius-sm);
  box-shadow: var(--s-shadow-flush); color: var(--s-ink-2); flex-shrink: 0;
}
.th-tpl-card.is-featured .th-tpl-icon { color: var(--s-pos) }
.th-tpl-icon svg { width: 18px; height: 18px }
.th-tpl-fmt {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--s-ink-4); padding: 4px 9px;
  background: rgba(160,175,200,0.08); border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(160,175,200,0.14); white-space: nowrap;
}
.th-tpl-name {
  font-size: 1rem; font-weight: 700; color: var(--s-ink);
  letter-spacing: -0.01em; line-height: 1.25; margin: 2px 0 0;
}
.th-tpl-card.is-featured .th-tpl-name { font-size: 1.12rem }
.th-tpl-desc { font-size: 0.83rem; color: var(--s-ink-3); line-height: 1.45; margin: 0; flex: 1 }
.th-dl-btn {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  margin-top: 4px; padding: 8px 14px;
  background: var(--s-surface-3); border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; color: var(--s-ink-2);
  box-shadow: var(--s-shadow-flush);
  transition: background 180ms, color 180ms, transform 180ms cubic-bezier(0.22,1,0.36,1);
}
.th-tpl-card:hover .th-dl-btn { background: var(--s-ink-2); color: var(--s-bg-sunk); transform: translateX(2px) }
.th-dl-btn svg { width: 14px; height: 14px }
.th-tpl-note { margin: 16px 2px 0; font-size: 0.8rem; color: var(--s-ink-4); line-height: 1.5 }
.th-tpl-note a { color: var(--s-ink-2); text-decoration: underline; text-underline-offset: 2px }
@media (max-width: 880px) {
  main.tools-hub { padding: 24px 16px 80px }
  .th-sp-head { flex-direction: column; align-items: flex-start; gap: 12px }
  .th-sp-tags { width: 100%; }
  .th-sp-stats { grid-template-columns: 1fr 1fr; row-gap: 14px }
  .th-stat:nth-child(3)::before { display: none }
  .th-teaser { grid-template-columns: auto 1fr; gap: 14px }
  .th-tz-status { grid-column: 2 / 3; justify-self: start; margin-top: 4px }
  .th-tpl-head { flex-direction: column; align-items: flex-start; gap: 12px }
  .th-tpl-guide { align-self: stretch; justify-content: center }
  .th-tpl-grid { grid-template-columns: 1fr }
}
@media (max-width: 540px) {
  .th-ribbon { height: 70px }
  .th-sp-visual { padding: 18px 18px }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
.seo-content { max-width: 840px; margin: 64px auto 0; padding: 0 8px; }
.seo-block { margin-bottom: 44px }
.seo-block:last-child { margin-bottom: 0 }
.seo-block h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--s-ink); margin: 0 0 16px; }
.seo-block p { font-size: 0.95rem; line-height: 1.75; color: var(--s-ink-2); margin: 0 0 14px; }
.seo-block p:last-child { margin-bottom: 0 }
.seo-block strong { color: var(--s-ink); font-weight: 600 }
.seo-block a { color: var(--s-ink); text-decoration: none; border-bottom: 1px solid var(--s-line-2); transition: border-color .2s, color .2s; }
.seo-block a:hover { color: #fff; border-bottom-color: var(--s-ink-2); }
.faq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.faq-item { background: var(--s-surface); border-radius: var(--s-radius); box-shadow: var(--s-shadow-card); overflow: hidden; transition: background 200ms cubic-bezier(0.22,1,0.36,1); }
.faq-item[open] { background: var(--s-surface-2) }
.faq-item summary { cursor: pointer; list-style: none; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.93rem; font-weight: 600; color: var(--s-ink); transition: color 180ms; }
.faq-item summary::-webkit-details-marker { display: none }
.faq-item summary:hover { color: #fff }
.faq-item summary::after { content: '+'; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 1.3rem; font-weight: 300; color: var(--s-ink-3); transition: transform 220ms cubic-bezier(0.22,1,0.36,1); flex-shrink: 0; line-height: 1; }
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--s-pos); }
.faq-answer { padding: 0 20px 18px; font-size: 0.9rem; line-height: 1.7; color: var(--s-ink-2); }
.faq-answer strong { color: var(--s-ink); font-weight: 600 }
.faq-answer a { color: var(--s-ink); text-decoration: none; border-bottom: 1px solid var(--s-line-2); transition: border-color .2s, color .2s; }
.faq-answer a:hover { color: #fff; border-bottom-color: var(--s-ink-2); }
