/* Babyphone Video — rétention articles (verdict, sommaire, vidéo, tableaux) */

:root {
  --bpv-retention-navy: #1a365d;
  --bpv-retention-orange: #ff9900;
  --bpv-retention-border: #e2e8f0;
  --bpv-retention-muted: #64748b;
  --bpv-retention-surface: #f8fafc;
}

.bpv-verdict,
.bpv-keypoints,
.bpv-toc,
.bpv-youtube-facade {
  margin: 1rem 0 1.25rem;
}

@media (max-width: 768px) {
  .bpv-verdict {
    margin-top: 0.75rem;
  }

  .bpv-verdict-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .bpv-verdict-thumb {
    width: 56px;
    height: 56px;
  }
}

/* --- Verdict Top 3 --- */

.bpv-verdict {
  border: 1px solid var(--bpv-retention-border);
  border-radius: 12px;
  background: var(--bpv-retention-surface);
  padding: 0.85rem 1rem;
  box-shadow: 0 2px 12px rgba(26, 54, 93, 0.06);
}

.bpv-verdict-title,
.bpv-keypoints-title {
  margin: 0 0 0.85rem;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--bpv-retention-navy);
}

.bpv-verdict-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bpv-verdict-list > .bpv-verdict-item {
  margin: 0;
  padding: 0.6rem;
}

.bpv-verdict-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-areas:
    "badge badge"
    "thumb body";
  gap: 0.4rem 0.65rem;
  align-items: start;
  background: #fff;
  border: 1px solid var(--bpv-retention-border);
  border-radius: 10px;
}

.bpv-verdict-item:first-child {
  border-left: 3px solid var(--bpv-retention-orange);
  background: #fffaf3;
}

.bpv-verdict-item:not(:first-child) .bpv-verdict-name {
  font-size: 0.88rem;
}

.bpv-verdict-item:not(:first-child) .bpv-verdict-cta {
  padding: 0.45rem 0.7rem;
  font-size: 0.8125rem;
}

.bpv-verdict-badge {
  grid-area: badge;
  display: inline-block;
  width: fit-content;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--bpv-retention-navy);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.bpv-verdict-thumb {
  grid-area: thumb;
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--bpv-retention-border);
  flex-shrink: 0;
}

.bpv-verdict-thumb--empty {
  display: block;
  background: #edf2f7;
}

.bpv-verdict-body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.bpv-verdict-name {
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--bpv-retention-navy);
  overflow-wrap: break-word;
  word-break: normal;
}

.bpv-verdict-why {
  display: block;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--bpv-retention-muted);
  overflow-wrap: break-word;
}

.bpv-verdict-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111;
}

.bpv-verdict-cta {
  display: inline-block;
  width: auto;
  max-width: 100%;
  align-self: flex-start;
  margin-top: 0.15rem;
  padding: 0.55rem 0.85rem;
  background: var(--bpv-retention-orange);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}

.bpv-verdict-disclaimer {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--bpv-retention-muted);
}

.bpv-verdict-anchor {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bpv-retention-navy);
  text-decoration: none;
}

.bpv-verdict-anchor:hover {
  text-decoration: underline;
}

/* --- À retenir (articles conseil) --- */

.bpv-keypoints {
  border-left: 4px solid var(--bpv-retention-orange);
  background: var(--bpv-retention-surface);
  padding: 1rem 1.1rem;
  border-radius: 0 10px 10px 0;
}

.bpv-keypoints-list {
  margin: 0;
  padding-left: 1.15rem;
}

.bpv-keypoints-list li {
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

/* --- Sommaire --- */

.bpv-toc {
  border: 1px solid var(--bpv-retention-border);
  border-radius: 10px;
  background: #fff;
}

.bpv-toc-details {
  margin: 0;
}

.bpv-toc-summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: var(--bpv-retention-navy);
  list-style: none;
}

.bpv-toc-summary::-webkit-details-marker {
  display: none;
}

.bpv-toc-summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}

.bpv-toc-details[open] .bpv-toc-summary::before {
  transform: rotate(90deg);
}

.bpv-toc-list {
  margin: 0;
  padding: 0 1rem 0.85rem 1.35rem;
  font-size: 0.925rem;
  line-height: 1.5;
}

.bpv-toc-list a {
  color: var(--bpv-retention-navy);
  text-decoration: none;
}

.bpv-toc-list a:hover {
  text-decoration: underline;
}

@media (min-width: 769px) {
  .bpv-toc-details[open] .bpv-toc-summary,
  .bpv-toc-summary {
    cursor: default;
  }

  .bpv-toc-summary::before {
    display: none;
  }
}

/* --- YouTube facade --- */

.bpv-youtube-facade {
  max-width: 100%;
}

.bpv-youtube-play {
  position: relative;
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.bpv-youtube-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.bpv-youtube-play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
}

.bpv-youtube-play-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
}

.bpv-youtube-caption {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--bpv-retention-muted);
  text-align: center;
}

.bpv-youtube-facade.is-loaded .bpv-youtube-play {
  display: none;
}

.bpv-youtube-iframe-wrap {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.bpv-youtube-iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Tableau comparatif mobile --- */

.bpv-table-wrap {
  margin: 1.25rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 769px) {
  .bpv-comparatif-table {
    width: 100%;
    border-collapse: collapse;
  }
}

@media (max-width: 768px) {
  .bpv-table-wrap {
    overflow: visible;
  }

  .bpv-comparatif-table,
  .bpv-comparatif-table thead,
  .bpv-comparatif-table tbody,
  .bpv-comparatif-table tr,
  .bpv-comparatif-table th,
  .bpv-comparatif-table td {
    display: block;
    width: 100%;
  }

  .bpv-comparatif-table thead {
    display: none;
  }

  .bpv-comparatif-table tbody tr {
    margin-bottom: 1rem;
    padding: 0.85rem;
    border: 1px solid var(--bpv-retention-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.05);
  }

  .bpv-comparatif-table td {
    display: grid;
    grid-template-columns: minmax(90px, 38%) 1fr;
    gap: 0.35rem 0.75rem;
    padding: 0.45rem 0;
    border: 0;
    text-align: left;
  }

  .bpv-comparatif-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--bpv-retention-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .bpv-comparatif-table td[data-label="Photo"] {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .bpv-comparatif-table td[data-label="Photo"]::before {
    display: none;
  }

  .bpv-comparatif-table td[data-label="Photo"] img {
    margin: 0 auto;
    max-width: 120px;
    height: auto;
  }

  .bpv-comparatif-table td[data-label="Actions"] {
    grid-template-columns: 1fr;
    padding-top: 0.65rem;
  }

  .bpv-comparatif-table td[data-label="Actions"]::before {
    margin-bottom: 0.25rem;
  }

  .bpv-comparatif-table td[data-label="Fonctionnalités Clés"] {
    grid-template-columns: 1fr;
  }

  .bpv-comparatif-table td[data-label="Fonctionnalités Clés"]::before {
    margin-bottom: 0.15rem;
  }

  .bpv-features-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--bpv-retention-navy);
    font-size: 0.875rem;
  }

  .bpv-features-body {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    line-height: 1.45;
  }
}

.bpv-retention-marker {
  display: none !important;
}
