/**
 * Fiche Produit Standardisée — Manga Health & Technology / Tekanayo
 * Guide officiel du vendeur (Boutique #8) & modèle uniforme réutilisable.
 *
 * Conforme pixel-par-pixel à la maquette graphique officielle :
 * Section 1 : Introduction (Bleu #007bff)
 * Section 2 : Points forts (Vert #28a745)
 * Section 3 : Composition et ingrédients (Violet #8a2be2)
 * Section 4 : Conseils d'utilisation (Orange #ff7f0e)
 * Section 5 : Précautions d'emploi (Rouge #dc3545)
 * Section 6 : Questions fréquentes (Bleu #007bff)
 */

:root {
  /* =========================================================================
     1. PALETTE DE COULEURS OFFICIELLE (ALIGNÉE SUR LA MAQUETTE MANGA HEALTH)
     ========================================================================= */

  /* Section 1 : Introduction (sans titre) — Bleu */
  --tk-desc-intro-bg: #f0f7ff;
  --tk-desc-intro-border: #cce5ff;
  --tk-desc-intro-title: #0056b3;
  --tk-desc-intro-accent: #007bff;
  --tk-desc-intro-badge: #007bff;
  --tk-desc-intro-text: #1e293b;

  /* Section 2 : Points forts — Vert émeraude */
  --tk-desc-points-bg: #edf9f0;
  --tk-desc-points-border: #b3e6c3;
  --tk-desc-points-title: #1e7e34;
  --tk-desc-points-accent: #28a745;
  --tk-desc-points-badge: #28a745;
  --tk-desc-points-text: #155724;

  /* Section 3 : Composition et ingrédients — Violet / Pourpre */
  --tk-desc-comp-bg: #f8f0fc;
  --tk-desc-comp-border: #e4c6f9;
  --tk-desc-comp-title: #6f2dbd;
  --tk-desc-comp-accent: #8a2be2;
  --tk-desc-comp-badge: #8a2be2;
  --tk-desc-comp-text: #4a154b;

  /* Section 4 : Posologie et conseils d'utilisation — Orange chaud */
  --tk-desc-usage-bg: #fff5ea;
  --tk-desc-usage-border: #ffd5a8;
  --tk-desc-usage-title: #c45500;
  --tk-desc-usage-accent: #ff7f0e;
  --tk-desc-usage-badge: #ff7f0e;
  --tk-desc-usage-text: #7a3500;

  /* Section 5 : Précautions d'emploi — Rouge */
  --tk-desc-warn-bg: #fdeeee;
  --tk-desc-warn-border: #f8b8b8;
  --tk-desc-warn-title: #bd2130;
  --tk-desc-warn-accent: #dc3545;
  --tk-desc-warn-badge: #dc3545;
  --tk-desc-warn-text: #721c24;

  /* Section 6 : Questions fréquentes — Bleu */
  --tk-desc-faq-bg: #f0f7ff;
  --tk-desc-faq-border: #cce5ff;
  --tk-desc-faq-title: #0056b3;
  --tk-desc-faq-accent: #007bff;
  --tk-desc-faq-badge: #007bff;
  --tk-desc-faq-text: #0c4a6e;

  /* Section libre / Autres rubriques */
  --tk-desc-extra-bg: #f8fafc;
  --tk-desc-extra-border: #e2e8f0;
  --tk-desc-extra-title: #334155;
  --tk-desc-extra-accent: #64748b;
  --tk-desc-extra-badge: #94a3b8;
  --tk-desc-extra-text: #1e293b;

  /* Badges de confiance sous la galerie média */
  --tk-trust-badge-bg: #ffffff;
  --tk-trust-badge-border: #e2e8f0;
  --tk-trust-badge-text: #334155;
  --tk-trust-badge-icon: #10b981;
}

/* =========================================================================
   MODE SOMBRE (DARK MODE ACCESSIBLE)
   ========================================================================= */
[data-theme="dark"], .dark, [data-theme="sombre"] {
  --tk-desc-intro-bg: rgba(0, 123, 255, 0.12);
  --tk-desc-intro-border: rgba(0, 123, 255, 0.35);
  --tk-desc-intro-title: #60a5fa;
  --tk-desc-intro-accent: #3b82f6;
  --tk-desc-intro-badge: #2563eb;
  --tk-desc-intro-text: #e2e8f0;

  --tk-desc-points-bg: rgba(40, 167, 69, 0.14);
  --tk-desc-points-border: rgba(40, 167, 69, 0.38);
  --tk-desc-points-title: #4ade80;
  --tk-desc-points-accent: #22c55e;
  --tk-desc-points-badge: #16a34a;
  --tk-desc-points-text: #dcfce7;

  --tk-desc-comp-bg: rgba(138, 43, 226, 0.14);
  --tk-desc-comp-border: rgba(138, 43, 226, 0.38);
  --tk-desc-comp-title: #c084fc;
  --tk-desc-comp-accent: #a855f7;
  --tk-desc-comp-badge: #9333ea;
  --tk-desc-comp-text: #f3e8ff;

  --tk-desc-usage-bg: rgba(255, 127, 14, 0.14);
  --tk-desc-usage-border: rgba(255, 127, 14, 0.38);
  --tk-desc-usage-title: #fbbf24;
  --tk-desc-usage-accent: #f59e0b;
  --tk-desc-usage-badge: #d97706;
  --tk-desc-usage-text: #fef3c7;

  --tk-desc-warn-bg: rgba(220, 53, 69, 0.14);
  --tk-desc-warn-border: rgba(220, 53, 69, 0.38);
  --tk-desc-warn-title: #f87171;
  --tk-desc-warn-accent: #ef4444;
  --tk-desc-warn-badge: #dc2626;
  --tk-desc-warn-text: #fee2e2;

  --tk-desc-faq-bg: rgba(0, 123, 255, 0.12);
  --tk-desc-faq-border: rgba(0, 123, 255, 0.35);
  --tk-desc-faq-title: #60a5fa;
  --tk-desc-faq-accent: #3b82f6;
  --tk-desc-faq-badge: #2563eb;
  --tk-desc-faq-text: #e0f2fe;

  --tk-desc-extra-bg: rgba(30, 41, 59, 0.55);
  --tk-desc-extra-border: rgba(148, 163, 184, 0.25);
  --tk-desc-extra-title: #cbd5e1;
  --tk-desc-extra-accent: #94a3b8;
  --tk-desc-extra-badge: #64748b;
  --tk-desc-extra-text: #e2e8f0;

  --tk-trust-badge-bg: rgba(30, 41, 59, 0.75);
  --tk-trust-badge-border: rgba(148, 163, 184, 0.25);
  --tk-trust-badge-text: #cbd5e1;
  --tk-trust-badge-icon: #34d399;
}

/* =========================================================================
   CONTENEUR PRINCIPAL DE LA DESCRIPTION STANDARDISÉE
   ========================================================================= */
.manga-standardized-desc {
  width: 100%;
  margin: 32px 0;
  font-family: inherit;
  color: var(--tk-desc-intro-text);
}

/* Sections sous forme de cartes conformes à la maquette */
.manga-desc-card {
  position: relative;
  border-radius: 14px;
  border: 1.5px solid transparent;
  padding: 22px 26px;
  margin-bottom: 20px;
  background-clip: padding-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* En-tête des cartes */
.manga-desc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

/* En-tête cliquable sur mobile */
summary.manga-section-summary {
  list-style: none;
  cursor: default;
  outline: none;
  user-select: none;
}
summary.manga-section-summary::-webkit-details-marker {
  display: none;
}

.manga-section-chevron {
  display: none; /* Masqué sur ordinateur, affiché sur smartphone */
  margin-left: auto;
  font-size: 15px;
  transition: transform 0.25s ease;
}

.manga-desc-card[open] .manga-section-chevron {
  transform: rotate(180deg);
}

/* Numéro de repère visuel (Pastille 1, 2, 3...) masqué pour épurer les points */
.manga-num-badge {
  display: none !important;
}

/* Titres de rubriques h3 */
.manga-desc-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.manga-desc-title i {
  font-size: 18px;
}

/* Corps de texte standard */
.manga-desc-body {
  font-size: 15px;
  line-height: 1.7;
}

.manga-desc-body p {
  margin: 0 0 10px 0;
}
.manga-desc-body p:last-child {
  margin-bottom: 0;
}

.manga-desc-body strong {
  font-weight: 700;
}

/* Listes à puces standard */
.manga-desc-body ul {
  margin: 8px 0 12px 0;
  padding-left: 22px;
  list-style-type: disc;
}

.manga-desc-body ul:last-child {
  margin-bottom: 0;
}

.manga-desc-body li {
  margin-bottom: 8px;
  line-height: 1.55;
}

.manga-desc-body li:last-child {
  margin-bottom: 0;
}

/* =========================================================================
   1. SECTION : INTRODUCTION (Sans titre, uniquement le texte) — BLEU
   ========================================================================= */
.manga-card-intro {
  background: var(--tk-desc-intro-bg);
  border-color: var(--tk-desc-intro-border);
  padding: 22px 26px;
}

.manga-card-intro .manga-desc-header,
.manga-card-intro .manga-desc-title,
.manga-card-intro .manga-num-badge {
  display: none !important;
}

.manga-card-intro .manga-desc-body {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--tk-desc-intro-text);
  margin: 0;
}

/* =========================================================================
   2. SECTION : POINTS FORTS — VERT ÉMERAUDE & COCHES VERTES
   ========================================================================= */
.manga-card-points {
  background: var(--tk-desc-points-bg);
  border-color: var(--tk-desc-points-border);
}

.manga-card-points .manga-num-badge {
  background: var(--tk-desc-points-badge);
}

.manga-card-points .manga-desc-title {
  color: var(--tk-desc-points-title);
}

.manga-card-points .manga-desc-title i {
  color: var(--tk-desc-points-accent);
}

.manga-card-points .manga-desc-body {
  color: var(--tk-desc-points-text);
}

/* Coches vertes stylisées pour les points forts */
.manga-card-points .manga-desc-body ul {
  list-style: none;
  padding-left: 0;
}

.manga-card-points .manga-desc-body li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}

.manga-card-points .manga-desc-body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--tk-desc-points-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 1px 3px rgba(40, 167, 69, 0.3);
}

/* =========================================================================
   3. SECTION : COMPOSITION ET INGRÉDIENTS — VIOLET
   ========================================================================= */
.manga-card-comp {
  background: var(--tk-desc-comp-bg);
  border-color: var(--tk-desc-comp-border);
}

.manga-card-comp .manga-num-badge {
  background: var(--tk-desc-comp-badge);
}

.manga-card-comp .manga-desc-title {
  color: var(--tk-desc-comp-title);
}

.manga-card-comp .manga-desc-title i {
  color: var(--tk-desc-comp-accent);
}

.manga-card-comp .manga-desc-body {
  color: var(--tk-desc-comp-text);
}

/* =========================================================================
   4. SECTION : CONSEILS D'UTILISATION — ORANGE
   ========================================================================= */
.manga-card-usage {
  background: var(--tk-desc-usage-bg);
  border-color: var(--tk-desc-usage-border);
}

.manga-card-usage .manga-num-badge {
  background: var(--tk-desc-usage-badge);
}

.manga-card-usage .manga-desc-title {
  color: var(--tk-desc-usage-title);
}

.manga-card-usage .manga-desc-title i {
  color: var(--tk-desc-usage-accent);
}

.manga-card-usage .manga-desc-body {
  color: var(--tk-desc-usage-text);
}

/* =========================================================================
   5. SECTION : PRÉCAUTIONS D'EMPLOI — ROUGE
   ========================================================================= */
.manga-card-warn {
  background: var(--tk-desc-warn-bg);
  border-color: var(--tk-desc-warn-border);
}

.manga-card-warn .manga-num-badge {
  background: var(--tk-desc-warn-badge);
}

.manga-card-warn .manga-desc-title {
  color: var(--tk-desc-warn-title);
}

.manga-card-warn .manga-desc-title i {
  color: var(--tk-desc-warn-accent);
}

.manga-card-warn .manga-desc-body {
  color: var(--tk-desc-warn-text);
}

/* =========================================================================
   6. SECTION : QUESTIONS FRÉQUENTES — BLEU & ACCORDÉONS
   ========================================================================= */
.manga-card-faq {
  background: var(--tk-desc-faq-bg);
  border-color: var(--tk-desc-faq-border);
}

.manga-card-faq .manga-num-badge {
  background: var(--tk-desc-faq-badge);
}

.manga-card-faq .manga-desc-title {
  color: var(--tk-desc-faq-title);
}

.manga-card-faq .manga-desc-title i {
  color: var(--tk-desc-faq-accent);
}

/* Conteneur des accordéons */
.manga-faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

/* Éléments de l'accordéon (<details>) */
.manga-faq-item {
  background: #ffffff;
  border: 1px solid var(--tk-desc-faq-border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}

[data-theme="dark"] .manga-faq-item,
.dark .manga-faq-item {
  background: rgba(30, 41, 59, 0.7);
}

.manga-faq-item[open] {
  border-color: var(--tk-desc-faq-accent);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

/* En-tête cliquable (<summary>) */
.manga-faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--tk-desc-faq-title);
  list-style: none;
  outline: none;
}

.manga-faq-summary::-webkit-details-marker {
  display: none;
}

.manga-faq-summary:focus-visible {
  outline: 2px solid var(--tk-desc-faq-accent);
  outline-offset: -2px;
}

.manga-faq-summary h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: inherit;
  flex: 1;
}

/* Flèche chevron tournante */
.manga-faq-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--tk-desc-faq-accent);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.manga-faq-item[open] .manga-faq-chevron {
  transform: rotate(180deg);
}

/* Contenu de la réponse */
.manga-faq-content {
  padding: 0 18px 14px 18px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--tk-desc-faq-text);
  border-top: 1px dashed rgba(184, 218, 255, 0.5);
  padding-top: 10px;
}

.manga-faq-content p {
  margin: 0 0 8px 0;
}

.manga-faq-content p:last-child {
  margin-bottom: 0;
}

/* =========================================================================
   SECTIONS SUPPLÉMENTAIRES
   ========================================================================= */
.manga-card-extra {
  background: var(--tk-desc-extra-bg);
  border-color: var(--tk-desc-extra-border);
}

.manga-card-extra .manga-num-badge {
  background: var(--tk-desc-extra-badge);
}

.manga-card-extra .manga-desc-title {
  color: var(--tk-desc-extra-title);
}

.manga-card-extra .manga-desc-body {
  color: var(--tk-desc-extra-text);
}

/* =========================================================================
   BADGES DE CONFIANCE GALERIE (PRODUIT ORIGINAL, STOCK, LIVRAISON)
   ========================================================================= */
.prod-gallery-trust-badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--tk-trust-badge-bg);
  border: 1px solid var(--tk-trust-badge-border);
  border-radius: 12px;
}

.trust-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 4px;
}

.trust-badge-item i {
  font-size: 20px;
  color: var(--tk-trust-badge-icon);
}

.trust-badge-item span {
  font-size: 12px;
  font-weight: 700;
  color: var(--tk-trust-badge-text);
  line-height: 1.25;
}

/* Lignes de réassurance directe sous le prix */
.prod-quick-assurances {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 18px 0;
  font-size: 14px;
}

.quick-assurance-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft, #475569);
  font-weight: 500;
}

.quick-assurance-line i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.quick-assurance-line--delivery i {
  color: #2563eb;
}

.quick-assurance-line--payment i {
  color: #059669;
}

/* =========================================================================
   RESPONSIVE DESIGN SMARTPHONE (CONFORME À LA MAQUETTE MOBILE DE L'IMAGE 1)
   ========================================================================= */
@media (max-width: 768px) {
  .manga-desc-card {
    padding: 16px 18px;
    border-radius: 12px;
    margin-bottom: 14px;
  }

  summary.manga-section-summary {
    cursor: pointer;
  }

  .manga-section-chevron {
    display: inline-flex;
    color: inherit;
  }

  .manga-desc-title {
    font-size: 16px;
  }

  .manga-num-badge {
    width: 26px;
    height: 26px;
    min-width: 26px;
    font-size: 13px;
  }

  .manga-desc-body {
    font-size: 14px;
    margin-top: 12px;
  }

  .manga-faq-summary {
    padding: 11px 14px;
    font-size: 14px;
  }

  .manga-faq-summary h4 {
    font-size: 14px;
  }

  .manga-faq-content {
    padding: 0 14px 12px 14px;
    font-size: 13.5px;
  }

  .prod-gallery-trust-badges {
    gap: 8px;
    padding: 10px 6px;
  }

  .trust-badge-item i {
    font-size: 17px;
  }

  .trust-badge-item span {
    font-size: 11px;
  }
}
