/* ==========================================================
   ecomstrike — Templates systeme.io
   Complète style.css (à charger après)
   ========================================================== */

.tpl {
  align-items: stretch;
  text-align: left;
  max-width: 940px;
  width: 100%;
  margin: 0 auto;
  padding: 72px 22px 88px;
}

.tpl h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 600;
  letter-spacing: -.03em;
}

.tpl h1 {
  margin-top: 14px;
  font-size: clamp(38px, 6.4vw, 68px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.06;
  background: linear-gradient(180deg, #fff 35%, rgba(255,255,255,.6));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead { max-width: 54ch; margin: 20px auto 0; }

.stats {
  margin-top: 46px;
  display: flex;
  justify-content: center;
  gap: 48px;
}
.stats div { display: flex; flex-direction: column; gap: 4px; }
.stats b { font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.stats span { font-size: 12px; color: var(--grey-dark); }

/* ---------- systeme.io ---------- */
.about { margin-top: 96px; }
.about .lead { max-width: 62ch; margin-top: 12px; }

/* ---------- Filtres ---------- */
.showcase { margin-top: 96px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.filters { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--grey);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color .3s, background .3s, border-color .3s;
}
.chip:hover { color: var(--white); border-color: rgba(255,255,255,.4); }
.chip.is-on { background: #fff; border-color: #fff; color: #000; font-weight: 500; }
.chip:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- Cartes ---------- */
.cards {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.card-tpl {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--glass);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  transition: border-color .4s var(--ease), transform .4s var(--ease), box-shadow .4s;
}
.card-tpl:hover {
  border-color: rgba(255,255,255,.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.12);
}

/* Sortie / entrée au filtrage */
.card-tpl.hide {
  display: none;
}
.card-tpl.in {
  animation: cardIn .55s var(--ease) both;
  animation-delay: calc(var(--k) * .06s);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); filter: blur(5px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* Aperçus filaires */
.preview {
  position: relative;
  height: 148px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.09), transparent 70%),
    rgba(255,255,255,.02);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  contain: paint;
}

.preview span, .preview i {
  display: block;
  border-radius: 4px;
  background: rgba(255,255,255,.16);
}

.preview .bar { height: 10px; border-radius: 3px; }
.preview .block { flex: 1; border-radius: 8px; background: rgba(255,255,255,.09); }
.preview .row { display: flex; gap: 8px; height: 26px; background: none; }
.preview .row i { flex: 1; height: 100%; border-radius: 6px; background: rgba(255,255,255,.09); }
.preview .cta {
  height: 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  transition: transform .5s var(--ease);
}
.preview .line { height: 8px; background: rgba(255,255,255,.2); }
.preview .w70 { width: 70%; }
.preview .w60 { width: 60%; margin: 0 auto; }
.preview .w40 { width: 40%; margin: 0 auto; }
.preview .input { height: 22px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); }
.preview .screen { flex: 1; border-radius: 8px; background: rgba(255,255,255,.08); display: grid; place-items: center; }
.preview .screen i {
  width: 0; height: 0;
  border-radius: 0;
  background: none;
  border-left: 12px solid rgba(255,255,255,.6);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.preview .side { position: absolute; left: 16px; top: 16px; bottom: 16px; width: 34px; display: flex; flex-direction: column; gap: 6px; background: none; }
.preview .side i { height: 8px; background: rgba(255,255,255,.14); }
.preview .body { margin-left: 42px; flex: 1; display: flex; flex-direction: column; gap: 8px; background: none; }
.preview .body i { flex: 1; border-radius: 8px; background: rgba(255,255,255,.09); }
.preview .tiles { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: none; }
.preview .tiles i { border-radius: 6px; background: rgba(255,255,255,.09); }
.preview .split { flex: 1; display: flex; gap: 8px; background: none; }
.preview .split .left { flex: 1; border-radius: 8px; background: rgba(255,255,255,.12); }
.preview .split .right { flex: 1.2; border-radius: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); }

.card-tpl:hover .preview .cta { transform: scaleX(1.04); }

.p-capture { justify-content: center; gap: 10px; }
.p-lead .cta { width: 55%; margin-left: auto; }

/* Texte de la carte */
.meta { padding: 20px 20px 18px; display: flex; flex-direction: column; flex: 1; }
.meta h3 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.meta > p { margin-top: 8px; font-size: 13.5px; line-height: 1.55; color: var(--grey-dark); }

.tags { margin-top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.tags span {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--grey);
}

.foot {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.foot b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }

.go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--grey);
  font-size: 13px;
  text-decoration: none;
  transition: color .3s;
}
.go span {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  transition: background .35s var(--ease), border-color .35s, transform .35s var(--ease);
}
.go span::before {
  content: "";
  width: 5px; height: 5px;
  border-top: 1.4px solid currentColor;
  border-right: 1.4px solid currentColor;
  transform: rotate(45deg) translate(-1px, 1px);
}
.go:hover { color: var(--white); }
.go:hover span { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); transform: translateX(3px); }

.empty {
  display: none;
  margin-top: 40px;
  text-align: center;
  font-size: 14px;
  color: var(--grey-dark);
}
.empty.show { display: block; }

/* ---------- Inclus ---------- */
.included { margin-top: 96px; }

/* ---------- Étapes ---------- */
.steps { margin-top: 96px; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .tpl { padding: 44px 20px 64px; }
  .about, .showcase, .included, .steps, .final { margin-top: 68px; }
  .cards { grid-template-columns: 1fr; }
  .stats { gap: 28px; }
  .stats b { font-size: 22px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .filters {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; white-space: nowrap; }
  .stats { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .card-tpl.in { animation: none; }
}

@media (max-width: 380px) {
  .tpl { padding-left: 16px; padding-right: 16px; }
}
