/* ═══════════════════════════════════════════════════════════════════
   Fiche produit dashboard — Design Plat & Adaptatif (Sans Dégradés)
   ═══════════════════════════════════════════════════════════════════ */
.tpd-page {
  --tpd-ink: #171b25;
  --tpd-ink2: #4a5568;
  --tpd-muted: #626d7e;
  --tpd-line: #e2e8f0;
  --tpd-blue: #064fb7;
  --tpd-green: #087a50;
  --tpd-bg: #f8f9ff;
  overflow: clip;
  background: var(--tpd-bg);
  color: var(--tpd-ink);
}

/* ── Barre retour ── */
.tpd-backbar {
  display: flex;
  min-height: 48px;
  align-items: center;
  border-bottom: 1px solid var(--tpd-line);
  background: #fff;
  padding: 0 28px;
}

.tpd-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  border: 0;
  background: 0;
  color: #667184;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.tpd-back:hover { color: var(--tpd-blue); }

/* ═══════════════════════════════════════════════════════════════════
   Grille hero : visuel (gauche) + infos + achat (droite)
   ═══════════════════════════════════════════════════════════════════ */
.tpd-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 36px;
  align-items: start;
  background: #fff;
  padding: 28px;
  animation: tpd-enter .4s cubic-bezier(.2, .75, .25, 1) both;
}

/* ── Visuel produit (Couleurs solides plates, zéro dégradé) ── */
.tpd-visual-shell {
  position: relative;
  isolation: isolate;
  border: 1px solid #d4dce8;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
}

.tpd-visual-shell::before,
.tpd-visual-shell::after,
.tpd-purchase::before { display: none !important; }

.tpd-visual {
  position: relative;
  display: grid;
  min-height: 380px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #1e293b; /* Couleur solide par défaut */
}

/* Couleurs plates solides selon catégories */
.tpd-visual.ai { background: #1e3a8a; }
.tpd-visual.design { background: #991b1b; }
.tpd-visual.video { background: #0f172a; }
.tpd-visual.learn { background: #065f46; }
.tpd-visual.work { background: #075985; }
.tpd-visual.code { background: #312e81; }

.tpd-visual-label {
  position: absolute;
  z-index: 1;
  top: 16px;
  left: 16px;
  border: 0;
  border-radius: 8px;
  background: #ffffffde;
  padding: 7px 10px;
  color: var(--tpd-blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.tpd-visual-logo {
  z-index: 1;
  display: grid;
  width: 120px;
  height: 120px;
  place-items: center;
  border: 1px solid #ffffff55;
  border-radius: 32px;
  background: #ffffff1a;
  color: #fff;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 48px;
  font-weight: 800;
}

/* ── Colonne info ── */
.tpd-info-column {
  min-width: 0;
  position: sticky;
  top: 90px;
  align-self: start;
  z-index: 5;
}

.tpd-product-header {
  padding-top: 4px;
}

.tpd-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  color: var(--tpd-blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tpd-kicker .material-symbols-outlined { font-size: 15px; }

.tpd-product-header h1 {
  margin: 0 0 10px;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -.04em;
}

.tpd-product-header p {
  margin: 0;
  color: var(--tpd-ink2);
  font-size: 14px;
  line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════════════════
   Carte d'achat (sticky)
   ═══════════════════════════════════════════════════════════════════ */
.tpd-purchase {
  position: sticky;
  top: 90px;
  z-index: 5;
  margin-top: 22px;
  border: 1px solid #cbd5e3;
  border-radius: 14px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 8px 24px #17244a0a;
}

.tpd-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.tpd-price-row strong {
  color: var(--tpd-blue);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 700;
  letter-spacing: -.04em;
}

.tpd-price-row small {
  color: #7c8a9d;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.tpd-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  border: 0;
  border-radius: 11px;
  background: var(--tpd-blue);
  padding: 0 16px;
  color: #fff;
  cursor: pointer;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(6, 79, 183, .2);
  transition: .15s;
}

.tpd-buy:hover {
  background: #0045a0;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(6, 79, 183, .28);
}

.tpd-buy .material-symbols-outlined { font-size: 20px; }

.tpd-stock-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.tpd-stock-notice.out-of-stock {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #991b1b;
}

.tpd-stock-notice.out-of-stock .material-symbols-outlined {
  color: #dc2626;
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.tpd-stock-notice.in-stock {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  align-items: center;
  font-weight: 600;
}

.tpd-stock-notice.in-stock .material-symbols-outlined {
  color: #16a34a;
  font-size: 18px;
}

.tpd-buy.out-of-stock {
  background: #475569;
  box-shadow: 0 8px 18px rgba(71, 85, 105, 0.2);
}

.tpd-buy.out-of-stock:hover {
  background: #334155;
  box-shadow: 0 12px 24px rgba(51, 65, 85, 0.28);
}

.tpd-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--tpd-green);
  font-size: 11px;
  font-weight: 700;
}

.tpd-trust-row .material-symbols-outlined { font-size: 16px; }

/* Status paiement */
.tpd-payment-watch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid #cbd9ee;
  border-radius: 9px;
  background: #f1f6ff;
  padding: 11px 12px;
  color: #36577f;
}

.tpd-payment-watch[hidden] { display: none; }

.tpd-payment-watch > .material-symbols-outlined {
  flex: none;
  color: var(--tpd-blue);
  font-size: 20px;
  animation: tpd-spin 1.3s linear infinite;
}

.tpd-payment-watch strong,
.tpd-payment-watch small { display: block; }
.tpd-payment-watch strong { font-size: 11px; }
.tpd-payment-watch small { margin-top: 3px; color: #68778b; font-size: 10px; line-height: 1.4; }

.tpd-payment-watch.success { border-color: #b8dfcd; background: #eefaf4; color: var(--tpd-green); }
.tpd-payment-watch.success > .material-symbols-outlined,
.tpd-payment-watch.error > .material-symbols-outlined { animation: none; }
.tpd-payment-watch.error { border-color: #e9c2c2; background: #fff3f3; color: #a33131; }

/* ═══════════════════════════════════════════════════════════════════
   Contenu sous la grille hero
   ═══════════════════════════════════════════════════════════════════ */
.tpd-content-area {
  max-width: 1040px;
  margin: 0 auto;
  padding: 36px 28px 60px;
}

/* ── Section 1 : Split Description (Gauche) + Avantages (Droite) ── */
.tpd-overview-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start; /* S'adapte à la hauteur du texte */
  margin-bottom: 40px;
}

.tpd-desc-block,
.tpd-receive-block {
  height: fit-content; /* Adaptation automatique au texte */
  border: 1px solid var(--tpd-line);
  border-radius: 16px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(23, 36, 74, 0.03);
}

.tpd-block-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  border-bottom: 1px solid #f0f4f9;
  padding-bottom: 14px;
}

.tpd-block-head .material-symbols-outlined {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  border-radius: 10px;
  background: #eaf1fb; /* Solide, zéro dégradé */
  color: var(--tpd-blue);
  font-size: 20px;
}

.tpd-block-head h2 {
  margin: 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 19px;
  letter-spacing: -.02em;
}

.tpd-desc-text p {
  margin: 0 0 12px;
  color: var(--tpd-ink2);
  font-size: 13.5px;
  line-height: 1.65;
}

.tpd-desc-text p:last-child { margin-bottom: 0; }

.tpd-receive-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tpd-receive-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px 14px;
}

.tpd-receive-list li > .material-symbols-outlined {
  flex: none;
  margin-top: 1px;
  color: var(--tpd-green);
  font-size: 19px;
  font-variation-settings: 'FILL' 1;
}

.tpd-receive-list strong {
  display: block;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.tpd-receive-list span {
  display: block;
  margin-top: 2px;
  color: var(--tpd-muted);
  font-size: 12px;
  line-height: 1.45;
}

/* ── Section 2 : Après le paiement & Comment l'utiliser ── */
.tpd-howto-section {
  margin-bottom: 40px;
  border: 1px solid var(--tpd-line);
  border-radius: 18px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(23, 36, 74, 0.03);
}

.tpd-howto-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.tpd-howto-head > .material-symbols-outlined {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border-radius: 12px;
  background: #eaf1fb; /* Solide, zéro dégradé */
  color: var(--tpd-blue);
  font-size: 24px;
}

.tpd-howto-head h2 {
  margin: 0 0 4px;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 21px;
  letter-spacing: -.03em;
}

.tpd-howto-head p {
  margin: 0;
  color: var(--tpd-muted);
  font-size: 13px;
  line-height: 1.5;
}

.tpd-delivery-info-card {
  display: grid;
  gap: 20px;
}

.tpd-delivery-what {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid #cce0ff;
  border-radius: 12px;
  background: #f3f7fe;
  padding: 18px 20px;
}

.tpd-delivery-what > .material-symbols-outlined {
  flex: none;
  margin-top: 2px;
  color: var(--tpd-blue);
  font-size: 24px;
}

.tpd-delivery-what strong {
  display: block;
  color: var(--tpd-ink);
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 14px;
}

.tpd-delivery-what p {
  margin: 4px 0 10px;
  color: var(--tpd-ink2);
  font-size: 12.5px;
}

.tpd-delivery-items {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tpd-delivery-items li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tpd-ink);
  font-size: 12.5px;
}

.tpd-delivery-items li .material-symbols-outlined {
  color: var(--tpd-green);
  font-size: 16px;
}

.tpd-delivery-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 6px;
}

.tpd-delivery-step {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--tpd-line);
  border-radius: 12px;
  background: #fafcff;
  padding: 16px;
}

.tpd-step-badge {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--tpd-blue); /* Solide */
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 800;
}

.tpd-delivery-step strong {
  display: block;
  margin-bottom: 5px;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 13.5px;
}

.tpd-delivery-step p {
  margin: 0;
  color: var(--tpd-muted);
  font-size: 12px;
  line-height: 1.5;
}

/* ── Section 3 : FAQ ── */
.tpd-faq {
  border: 1px solid var(--tpd-line);
  border-radius: 18px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(23, 36, 74, 0.03);
}

.tpd-faq-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f0f4f9;
  padding-bottom: 14px;
}

.tpd-faq-head .material-symbols-outlined {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  border-radius: 10px;
  background: #eaf1fb;
  color: var(--tpd-blue);
  font-size: 20px;
}

.tpd-faq-head h2 {
  margin: 0;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 20px;
  letter-spacing: -.02em;
}

.tpd-faq-list {
  display: grid;
  gap: 10px;
}

.tpd-faq-item {
  overflow: hidden;
  border: 1px solid var(--tpd-line);
  border-radius: 11px;
  background: #fff;
}

.tpd-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: #fff;
  padding: 16px 18px;
  color: var(--tpd-ink);
  cursor: pointer;
  text-align: left;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.tpd-faq-question span {
  color: var(--tpd-muted);
  transition: transform .2s;
}

.tpd-faq-item.open .tpd-faq-question span {
  transform: rotate(180deg);
}

.tpd-faq-answer {
  display: none;
  border-top: 1px solid var(--tpd-line);
  padding: 14px 18px;
  color: var(--tpd-ink2);
  font-size: 13px;
  line-height: 1.6;
}

.tpd-faq-item.open .tpd-faq-answer {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════
   Accessibilité
   ═══════════════════════════════════════════════════════════════════ */
.tpd-back:focus-visible,
.tpd-buy:focus-visible,
.tpd-faq-question:focus-visible {
  outline: 3px solid #9dc2fa;
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1050px) {
  .tpd-detail-grid {
    grid-template-columns: 1fr;
  }

  .tpd-visual { min-height: 320px; }
  .tpd-purchase { position: static; }

  .tpd-overview-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tpd-delivery-steps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .tpd-backbar { padding: 0 16px; }

  .tpd-detail-grid {
    gap: 20px;
    padding: 18px;
  }

  .tpd-visual { min-height: 240px; }

  .tpd-visual-logo {
    width: 90px;
    height: 90px;
    border-radius: 24px;
    font-size: 36px;
  }

  .tpd-product-header h1 { font-size: 26px; }

  .tpd-content-area { padding: 24px 16px 40px; }

  .tpd-price-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .tpd-detail-grid { animation: none; }
  .tpd-buy { transition: none; }
  .tpd-payment-watch > .material-symbols-outlined { animation: none; }
}

@keyframes tpd-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes tpd-spin {
  to { transform: rotate(360deg); }
}
