/*
Theme Name: RV Lite
Theme URI: https://www.relation-virtuelle.com
Author: Dulbu
Description: Thème sur mesure ultra-léger pour relation-virtuelle.com. Aucun page builder, aucun jQuery, une seule feuille de style. Conçu pour la vitesse et le SEO.
Version: 1.1.0
License: GPL-2.0-or-later
Text Domain: rv-lite
*/

:root {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --bg-card: #1a2338;
  --line: #2c3a52;
  --fg: #f8fafc;
  --fg-muted: #a8b6cc;
  --accent: #ec4899;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(236, 72, 153, .12);
  --star: #fbbf24;
  --ok: #34d399;
  --ko: #f87171;
  --radius: 14px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- En-tête ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, .92);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(8px);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { font-weight: 700; font-size: 18px; color: var(--fg); letter-spacing: -.2px; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--fg-muted); font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a[aria-current] { color: var(--fg); text-decoration: none; }

/* ---------- Typographie ---------- */
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(30px, 5vw, 42px); }
h2 { font-size: clamp(23px, 3.4vw, 30px); margin-top: 1.6em; }
h3 { font-size: 19px; margin-top: 1.3em; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .45em; }
strong { color: #fff; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }

.lead { font-size: 19px; color: var(--fg-muted); }
.muted { color: var(--fg-muted); }
.small { font-size: 14px; }

/* ---------- Blocs ---------- */
main { padding: 34px 0 70px; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.sidebar { position: sticky; top: 88px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 600; font-size: 16px; text-align: center;
  border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(236, 72, 153, .3); }
.btn-block { display: block; width: 100%; }
.btn-ghost {
  background: transparent; border: 1px solid var(--line); color: var(--fg);
}
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }

/* ---------- Notes ---------- */
.rating { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.stars { color: var(--star); letter-spacing: 2px; font-size: 16px; }
.badge {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12.5px; font-weight: 600; letter-spacing: .3px;
}
.badge-free { background: rgba(52, 211, 153, .13); color: var(--ok); }

/* ---------- Listes pour/contre ---------- */
.proscons { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.proscons ul { list-style: none; padding: 0; margin: 0; }
.proscons li { padding-left: 26px; position: relative; }
.pros li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.cons li::before { content: "✕"; position: absolute; left: 0; color: var(--ko); font-weight: 700; }

/* ---------- Fiche outil ---------- */
.tool-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-bottom: 8px; }
.tool-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 14px 0 22px; }

.features { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.features li { padding-left: 26px; position: relative; }
.features li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

.spec { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.spec:last-child { border-bottom: 0; }
.spec span:first-child { color: var(--fg-muted); }

/* ---------- Cartes outil ---------- */
.tool-card { display: flex; flex-direction: column; gap: 10px; }
.tool-card h3 { margin: 0; font-size: 18px; }
.tool-card p { margin: 0; font-size: 15px; color: var(--fg-muted); flex: 1; }

/* ---------- Tableau comparatif ---------- */
.table-wrap { overflow-x: auto; margin: 1.4em 0; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 480px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--fg-muted); font-weight: 600; font-size: 14px; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; margin-bottom: 10px; background: var(--bg-card);
}
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { margin-bottom: 10px; }

/* ---------- Fil d'Ariane ---------- */
.crumbs { font-size: 14px; color: var(--fg-muted); margin-bottom: 18px; }
.crumbs a { color: var(--fg-muted); }
.crumbs a:hover { color: var(--fg); }

/* ---------- Pied de page ---------- */
.site-footer {
  border-top: 1px solid var(--line); padding: 40px 0;
  color: var(--fg-muted); font-size: 14.5px;
}
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px; margin-bottom: 26px; }
.site-footer a { color: var(--fg-muted); }
.site-footer a:hover { color: var(--fg); }
.site-footer ul { list-style: none; padding: 0; }

/* ---------- Divers ---------- */
.section { margin-top: 2.4em; }
.hero { text-align: center; padding: 26px 0 12px; }
.hero p { max-width: 720px; margin-left: auto; margin-right: auto; }
.cta-inline { text-align: center; padding: 26px; margin: 2em 0; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* ═══════════════════════════════════════════
   Présentation « produit »
   ═══════════════════════════════════════════ */

.product-head { display: flex; align-items: center; gap: 18px; margin-bottom: 6px; flex-wrap: wrap; }
.product-head h1 { margin: 0 0 6px; }
.product-logo img,
.product-card-logo img,
.product-box-logo img {
  width: 64px; height: 64px; border-radius: 14px; object-fit: cover;
  background: #fff; padding: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.product-card-logo img { width: 38px; height: 38px; border-radius: 10px; padding: 4px; }
.product-box-logo { text-align: center; margin-bottom: 16px; }
.product-box-logo img { width: 72px; height: 72px; display: inline-block; }

.product-shot {
  margin: 24px 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
.product-shot img { width: 100%; display: block; }

/* Carte produit */
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, border-color .18s ease; }
.product-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.product-card-shot { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.product-card-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .product-card-shot img { transform: scale(1.04); }
.product-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.product-card-head { display: flex; align-items: center; gap: 11px; }
.product-card-head h3 { margin: 0; font-size: 17px; }
.product-card-head h3 a { color: var(--fg); }
.product-card-head h3 a:hover { color: var(--accent); text-decoration: none; }
.product-card-body p { margin: 0; font-size: 14.5px; color: var(--fg-muted); flex: 1; }
.product-card-price { font-size: 14.5px; color: var(--fg-muted); }
.product-card-price strong { color: var(--fg); font-size: 16px; }
.product-card-actions { display: flex; gap: 9px; margin-top: 4px; }
.product-card-actions .btn { flex: 1; padding: 11px 14px; font-size: 14.5px; }

/* Encadré latéral */
.product-box .price { text-align: center; margin: 0 0 16px; font-size: 15px; color: var(--fg-muted); }
.product-box .price strong { display: block; font-size: 30px; color: var(--fg); line-height: 1.2; }
.product-box .price-from { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }

.btn-lg { padding: 16px 30px; font-size: 17px; }

/* ═══════════════════════════════════════════
   Avis visiteurs
   ═══════════════════════════════════════════ */

.reviews { margin-top: 3em; }
.rv-review-list { list-style: none; padding: 0; margin: 0 0 28px; }
.rv-review {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px;
}
.rv-review-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.rv-review-body p:last-child { margin-bottom: 0; }
.rv-form-title { margin-top: 0; }

.comment-respond {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.comment-form label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 15px; }
.comment-form input[type=text],
.comment-form input[type=email],
.comment-form input[type=url],
.comment-form textarea {
  width: 100%; padding: 11px 13px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg);
  font-family: inherit; font-size: 15px;
}
.comment-form textarea { resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus {
  outline: none; border-color: var(--accent);
}
.comment-form p { margin-bottom: 15px; }
.comment-form .form-submit { margin-bottom: 0; }
.comment-form .required { color: var(--accent); }

/* Étoiles cliquables : rendu sans JavaScript grâce à l'ordre inversé */
.rv-stars-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rv-stars-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.rv-stars-input label {
  font-size: 30px; line-height: 1; color: var(--line);
  cursor: pointer; transition: color .12s ease; margin: 0;
}
.rv-stars-input input:checked ~ label,
.rv-stars-input label:hover,
.rv-stars-input label:hover ~ label { color: var(--star); }
.rv-rating-field { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rv-rating-field label { margin: 0; }

.table-tool { display: inline-flex; align-items: center; gap: 10px; }
.table-logo { width: 30px !important; height: 30px !important; border-radius: 8px; padding: 3px; background: #fff; }

/* ---------- Identité ---------- */
.brand img { width: 190px; height: auto; display: block; }
@media (max-width: 600px) { .brand img { width: 150px; } }
