/* =====================================================
   review.css — Pages de test / avis produit
   Hero : lecteur YouTube gauche + titre + CTA droite
   ===================================================== */

/* --- Conteneur général --- */
#review_content {
  max-width: var(--max-width, 1280px);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* ===== HERO — full-bleed background ===== */
.review_hero_bg {
  width: 100%;
  background: linear-gradient(135deg, #0d1117 0%, #161b22 55%, #1a2332 100%);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 16px 16px;
}

/* Halo rouge discret */
.review_hero_bg::before {
  content: "";
  position: absolute;
  top: -80px;
  right: 5%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.15) 0%, transparent 65%);
  pointer-events: none;
}

/* Contenu hero : calé sur le même max-width + padding que le menu */
.review_hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  max-width: var(--max-width, 1280px);
  margin: 0 auto;
  padding: 2.5rem 0;
  position: relative;
}

@media (max-width: 1280px) {
  .review_hero {
    padding: 2.5rem 24px;
  }
}

/* --- Colonne vidéo (gauche) --- */
.review_video_wrap {
  width: 100%;
}

/* --- YouTube lazy embed --- */
.media_video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
}

.media_video picture {
  position: absolute;
  inset: 0;
  display: block;
}

.media_video picture img,
.media_video > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.media_video:hover picture img,
.media_video:hover > img {
  opacity: 0.85;
}

/* Bouton play */
.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  pointer-events: none;
  transition: transform 0.15s ease;
}

.media_video:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.1);
}

.play-btn svg {
  width: 68px;
  height: 48px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

/* iframe injectée par review.js */
.media_video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
}

/* --- Colonne intro (droite) --- */
.review_intro {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.review_intro h1 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin: 0;
}

/* --- Boxes rapides (avis + évaluation) --- */
.intro_quick_links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.intro_ql_box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

.intro_ql_box:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.ql_icon {
  font-size: 1.1rem;
  color: var(--color-primary, #e63946);
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}

.ql_content {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
}

.ql_title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.ql_meta {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.3;
}

.ql_arrow {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

/* --- Bouton CTA --- */
.review_cta {
  display: inline-block;
  background: var(--color-primary, #e63946);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s ease, transform 0.15s ease;
  align-self: flex-start;
}

.review_cta:hover {
  background: color-mix(in srgb, var(--color-primary, #e63946) 85%, #000);
  transform: translateY(-1px);
}

.review_cta:active {
  transform: translateY(0);
}

/* ===== Section Notre évaluation ===== */
.review_eval {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #eee;
}

.eval_h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
  margin: 0 0 1.5rem;
}

.eval_table {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.eval_row {
  display: grid;
  grid-template-columns: 200px 1fr 52px;
  align-items: center;
  gap: 1rem;
}

.eval_label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text, #1a1a1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eval_bar_wrap {
  height: 8px;
  background: #eee;
  border-radius: 99px;
  overflow: hidden;
}

.eval_bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}

.eval_bar--green  { background: #27ae60; }
.eval_bar--blue   { background: #2980b9; }
.eval_bar--orange { background: #e67e22; }
.eval_bar--red    { background: #e74c3c; }

.eval_score {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
  text-align: right;
  white-space: nowrap;
}

.eval_score_max {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-muted, #888);
}

.eval_note {
  font-size: 0.82rem;
  color: var(--color-muted, #888);
  line-height: 1.6;
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  background: #fafafa;
  border-left: 3px solid #e0e0e0;
  border-radius: 0 6px 6px 0;
}

.eval_text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.25rem;
}

.eval_text p {
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--color-text, #1a1a1a);
  margin: 0;
}

.eval_text_link {
  color: var(--color-primary, #e63946);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
}

.eval_text_link:hover {
  color: color-mix(in srgb, var(--color-primary, #e63946) 80%, #000);
}

@media (max-width: 600px) {
  .eval_row {
    grid-template-columns: 1fr 52px;
    grid-template-rows: auto auto;
    gap: 0.35rem 0.75rem;
  }

  .eval_label {
    grid-column: 1 / 2;
    grid-row: 1;
  }

  .eval_score {
    grid-column: 2 / 3;
    grid-row: 1;
  }

  .eval_bar_wrap {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* ===== Section Avis utilisateurs ===== */
.review_users {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #eee;
}

.users_h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
  margin: 0 0 1.25rem;
}

.users_stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.users_rating {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.rating_score {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-text, #1a1a1a);
  line-height: 1;
}

.rating_max {
  font-size: 1rem;
  color: var(--color-muted, #888);
}

.rating_stars {
  font-size: 1.3rem;
  color: #e6a817;
  letter-spacing: 0.05em;
  margin-left: 0.25rem;
}

.users_count {
  font-size: 0.9rem;
  color: var(--color-muted, #666);
  border-left: 1px solid #ddd;
  padding-left: 1.5rem;
}

.users_text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.users_text p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text, #1a1a1a);
  margin: 0;
}

/* ===== Section Caractéristiques ===== */
.review_characteristics {
  margin-bottom: 2.5rem;
}

.char_h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
  margin: 0 0 1.25rem;
}

/* Table — chaque tr affiché comme une box carrée */
.char_table,
.char_table tbody {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  width: 100%;
}

.char_table tr {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  aspect-ratio: 1 / 1;
  background: #f5f5f3;
  border-radius: 12px;
  padding: 12px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.char_table tr:hover {
  background: #ecebe6;
  transform: translateY(-2px);
}

.char_table th {
  display: block;
  font-size: 11px;
  color: #6b6b66;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  text-align: center;
  padding: 0;
}

.char_table td {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.3;
  text-align: center;
  border: none;
  padding: 0;
}

/* ===== Section Points positifs / négatifs ===== */
.verdict_h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
  margin: 0 0 1.25rem;
  grid-column: 1 / -1;
}

.review_verdict {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1.5rem;
  margin-bottom: 2.5rem;
}

.verdict_col_wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.verdict_col {
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  flex: 1;
}

.verdict_positive {
  background: #f0faf3;
  border: 1px solid #b7e4c7;
}

.verdict_negative {
  background: #fff5f5;
  border: 1px solid #ffc2c2;
}

.verdict_title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.verdict_title--positive {
  color: #1a7f3c;
}

.verdict_title--negative {
  color: #c0392b;
}

.verdict_icon {
  font-size: 0.9rem;
}

.verdict_list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.verdict_list li {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text, #1a1a1a);
  padding-left: 1.1rem;
  position: relative;
}

.verdict_positive .verdict_list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: #1a7f3c;
  font-size: 0.75rem;
  top: 0.2em;
}

.verdict_negative .verdict_list li::before {
  content: "✖";
  position: absolute;
  left: 0;
  color: #c0392b;
  font-size: 0.75rem;
  top: 0.2em;
}

/* ===== Section Positionnement marché ===== */
.review_market {
  margin-bottom: 2.5rem;
}

.market_h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
  margin: 0 0 0.5rem;
}

.market_subtitle {
  font-size: 0.9rem;
  color: var(--color-muted, #666);
  margin: 0 0 1.25rem;
  line-height: 1.6;
}

/* ===== Prix barré ===== */
.price_old {
  font-size: 0.82em;
  color: var(--color-muted, #999);
  text-decoration: line-through;
  font-weight: 400;
  white-space: nowrap;
}

.price_now {
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
  white-space: nowrap;
}

/* CTA hero : prix en blanc */
.review_cta .price_old {
  color: rgba(255, 255, 255, 0.6);
}

.review_cta .price_now {
  color: #fff;
}

/* Sticky CTA : prix compact */
.sticky_cta_btn .price_old {
  font-size: 0.78em;
  display: block;
  line-height: 1;
  margin-bottom: 1px;
}

.sticky_cta_btn .price_now {
  display: block;
  font-size: 1em;
  line-height: 1.2;
}

/* Tableau marché : prix inline */
.mt_price_wrap .price_old {
  font-size: 0.78em;
}

/* ===== Tableau comparatif Positionnement marché ===== */
.market_table_wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid #e2e2e2;
}

.market_table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  color: var(--color-text, #1a1a1a);
  min-width: 680px;
}

/* En-têtes */
.market_table thead tr {
  background: #f5f5f3;
  border-bottom: 2px solid #e2e2e2;
}

.market_table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b6b66;
  padding: 0.65rem 0.75rem;
  white-space: nowrap;
}

.market_table thead th.mt_col_name {
  text-align: left;
}

.market_table thead th.mt_col_num,
.market_table thead th.mt_col_action {
  text-align: center;
}

/* Lignes */
.market_table tbody tr {
  border-bottom: 1px solid #ebebeb;
  transition: background 0.15s ease;
}

.market_table tbody tr:last-child {
  border-bottom: none;
}

.market_table tbody tr:hover {
  background: #fafafa;
}

/* Ligne du produit principal */
.market_table tbody tr.mt_row--main {
  background: #f0fdf4;
}

.market_table tbody tr.mt_row--main:hover {
  background: #e6faf0;
}

.market_table tbody tr.mt_row--main td:first-child {
  border-left: 3px solid #27ae60;
}

/* Cellules */
.market_table td {
  padding: 0.75rem 0.75rem;
  vertical-align: middle;
}

.market_table td.mt_col_num {
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--color-muted, #555);
}

.market_table td.mt_col_action {
  text-align: center;
}

/* Colonne nom */
.mt_col_name {
  min-width: 160px;
}

.market_table td.mt_col_name {
  padding-left: 1rem;
}

.mt_brand {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.3;
}

.mt_model {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text, #1a1a1a);
  line-height: 1.3;
}

.mt_badge {
  display: inline-block;
  margin-top: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  background: #d1fae5;
  color: #065f46;
  border-radius: 20px;
  padding: 0.1rem 0.55rem;
  white-space: nowrap;
}

/* Prix en gras */
.mt_price {
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
}

/* Note étoile */
.mt_rating {
  color: #e6a817;
  font-weight: 600;
}

/* Bouton CTA */
.market_cta {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1.5px solid #ccc;
  color: var(--color-text, #333);
  background: #fff;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}

.market_cta:hover {
  border-color: var(--color-primary, #e63946);
  color: var(--color-primary, #e63946);
}

.market_cta--main {
  border-color: #27ae60;
  color: #27ae60;
}

.market_cta--main:hover {
  background: #27ae60;
  color: #fff;
  border-color: #27ae60;
}

/* ===== Sticky CTA ===== */
.sticky_cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  width: 340px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.07);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.sticky_cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sticky_cta_inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.sticky_cta_img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  background: #f5f5f3;
  flex-shrink: 0;
}

.sticky_cta_info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sticky_cta_name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.sticky_cta_meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
}

.sticky_star   { color: #e6a817; }
.sticky_rating { font-weight: 600; color: #1a1a1a; }
.sticky_reviews { color: #888; }

.sticky_cta_btn {
  flex-shrink: 0;
  display: inline-block;
  background: #27ae60;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: background 0.18s ease, transform 0.15s ease;
}

.sticky_cta_btn:hover {
  background: #219a55;
  transform: translateY(-1px);
}

/* ===== Responsive tablette ===== */
@media (max-width: 768px) {
  .review_hero {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.75rem 24px !important;
  }

  .review_verdict {
    grid-template-columns: 1fr;
  }

  .verdict_col_wrap {
    gap: 0.4rem;
  }

  .market_table_wrap {
    border-radius: 8px;
  }

  .review_intro h1 {
    font-size: clamp(1.3rem, 4vw, 1.7rem);
  }

  .review_cta {
    align-self: stretch;
  }
}

/* ===== Sticky CTA mobile — pleine largeur ===== */
@media (max-width: 768px) {
  .sticky_cta {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  }

  .sticky_cta_inner {
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .sticky_cta_btn {
    padding: 0.65rem 1.1rem;
    font-size: 0.92rem;
  }
}

/* ===== Responsive mobile — char_table ===== */
@media (max-width: 480px) {
  .char_table,
  .char_table tbody {
    grid-template-columns: repeat(2, 1fr);
  }

  .char_table tr {
    aspect-ratio: unset;
    min-height: 100px;
  }
}

/* ===== Responsive mobile ===== */
@media (max-width: 600px) {
  #review_content {
    padding: 0 0.75rem 2rem;
  }

  .review_hero {
    padding: 1.25rem 16px;
  }

  .intro_quick_links {
    grid-template-columns: 1fr;
  }

  .ql_arrow {
    display: none;
  }
}
