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

:root {
    --black:   #0A0A0A;
    --white:   #FFFFFF;
    --bg:      #F5F4F0;
    --card-bg: #FAFAF8;
    --border:  #E6E5DF;
    --text:    #111110;
    --mid:     #5A5855;
    --muted:   #9B9890;
    --hero-bg: #111110;
}

html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* nav: fond noir spécifique à la fiche produit */
.nav { background: #111110; }
.nav-back {
    font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: rgba(255,255,255,.6);
    display: inline-flex; align-items: center; gap: 6px;
}
.nav-back:hover { color: #fff; }

/* ── HERO ────────────────────────────── */
.hero {
    background: var(--hero-bg);
    padding: 100px 64px 0;
    position: relative; overflow: hidden;
}
.hero-content {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 420px; gap: 64px; align-items: end;
    padding-bottom: 56px;
}
.hero-eyebrow {
    display: flex; align-items: center; gap: 10px;
    font-size: 11px; font-weight: 600; letter-spacing: .2em;
    text-transform: uppercase; color: rgba(255,255,255,.35);
    margin-bottom: 20px;
}
.hero-eyebrow span { width: 24px; height: 1px; background: rgba(255,255,255,.2); display: block; }
.hero-brand { font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.45); margin-bottom: 8px; }
.hero-title {
    font-size: clamp(36px, 5vw, 68px);
    font-weight: 900; letter-spacing: -.04em; line-height: .95;
    color: var(--white); margin-bottom: 12px;
}
.hero-subtitle {
    font-size: 16px; font-weight: 400; color: rgba(255,255,255,.45);
    margin-bottom: 28px;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
    font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    padding: 5px 12px; color: var(--white);
}
.badge-type    { background: rgba(255,255,255,.12); }
.badge-electric  { background: #0F7B6C; }
.badge-hybrid    { background: #6B3FA0; }
.badge-thermal   { background: #7A5018; }
.badge-hydrogen  { background: #1A6B3A; }

/* Hero image */
.hero-img-wrap {
    height: 300px; position: relative;
    display: flex; align-items: flex-end; justify-content: center;
}
.hero-img-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
}
.hero-img-placeholder svg { opacity: .08; }
.hero-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: contain; object-position: bottom center;
}

/* ── MAIN LAYOUT (2 colonnes) ───────── */
.main {
    max-width: 1240px; margin: 0 auto; padding: 48px 64px 80px;
    display: grid; grid-template-columns: 360px 1fr; gap: 0 52px; align-items: start;
}
.content-col { min-width: 0; grid-column: 2; grid-row: 1; }
.sidebar-col  { position: sticky; top: 76px; grid-column: 1; grid-row: 1; }

/* ── SIDEBAR PANELS ──────────────────── */
.sidebar-panel { background: var(--white); border: 1px solid var(--border); margin-bottom: 16px; }
.sidebar-price-block { padding: 24px 24px 20px; border-bottom: 1px solid var(--border); }
.sidebar-price-lbl {
    font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 8px;
}
.sidebar-price-main {
    font-size: 48px; font-weight: 900; letter-spacing: -.05em; line-height: 1; color: var(--text);
}
.sidebar-price-main span { font-size: 18px; font-weight: 400; color: var(--muted); }
.sidebar-price-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.sidebar-panel-title {
    font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: var(--muted); padding: 13px 24px; border-bottom: 1px solid var(--border);
}
.sidebar-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 11px 24px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.sidebar-row:last-of-type { border-bottom: none; }
.sidebar-row-lbl { color: var(--muted); font-size: 11px; }
.sidebar-row-val { font-weight: 700; color: var(--text); text-align: right; }
.sidebar-row-val.is-active { color: #0F7B6C; }
.sidebar-row-val.is-expired { color: var(--muted); font-weight: 400; }
.sidebar-cta-wrap { padding: 16px 24px; }
.sidebar-cta {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 20px; background: var(--text); font-family: 'Inter', sans-serif;
    font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--white); text-decoration: none; transition: opacity .2s; width: 100%;
}
.sidebar-cta:hover { opacity: .8; }
.sidebar-cta-ghost {
    display: flex; align-items: center; justify-content: center;
    padding: 14px 20px; border: 1px solid var(--border); cursor: default;
    font-size: 11px; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: var(--muted); width: 100%;
}
.sidebar-model-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 24px; border-bottom: 1px solid var(--border);
    text-decoration: none; color: inherit; transition: background .15s;
}
.sidebar-model-card:last-child { border-bottom: none; }
.sidebar-model-card:hover { background: var(--bg); }
.sidebar-model-name { font-size: 13px; font-weight: 600; color: var(--text); }
.sidebar-model-moto { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sidebar-model-price { font-size: 15px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.sidebar-brand-cta {
    background: var(--hero-bg); padding: 20px 24px; margin-bottom: 16px;
    display: flex; flex-direction: column; gap: 12px;
}
.sidebar-brand-cta-title { font-size: 14px; font-weight: 800; color: var(--white); }
.sidebar-brand-cta-sub { font-size: 12px; color: rgba(255,255,255,.4); }
.sidebar-brand-cta-btn {
    display: flex; align-items: center; justify-content: center;
    padding: 11px 20px; background: #C9A84C; font-size: 11px; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; color: #0C1A35;
    text-decoration: none; transition: opacity .2s;
}
.sidebar-brand-cta-btn:hover { opacity: .85; }
.trend-up   { color: #C04C20; }
.trend-down { color: #0F7B6C; }

/* ── SPECS ───────────────────────────── */
.section-title {
    font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 24px;
    display: flex; align-items: center; gap: 12px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.specs-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    border: 1px solid var(--border); background: var(--border); gap: 1px;
    margin-bottom: 56px;
}
.spec-item {
    background: var(--white); padding: 20px 24px;
}
.spec-lbl { font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.spec-val { font-size: 16px; font-weight: 700; color: var(--text); }
.spec-val-placeholder { font-size: 14px; font-weight: 400; color: var(--muted); font-style: italic; }

/* ── HISTORY TABLE ───────────────────── */
.history-wrap { margin-bottom: 56px; }
.history-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--border); }
.history-table th {
    text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .16em;
    text-transform: uppercase; color: var(--muted);
    padding: 14px 20px; border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.history-table td {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    font-size: 14px; color: var(--text);
    vertical-align: middle;
}
.history-table tr:last-child td { border-bottom: none; }
.history-table tr.row-active td { background: #FAFAF8; }
.badge-active {
    display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; padding: 3px 8px;
    background: #0F7B6C; color: #fff;
}
.badge-expired {
    display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; padding: 3px 8px;
    background: var(--border); color: var(--muted);
}
.price-diff-up   { color: #C04C20; font-size: 11px; font-weight: 600; }
.price-diff-down { color: #0F7B6C; font-size: 11px; font-weight: 600; }
.price-diff-same { color: var(--muted); font-size: 11px; }
.current-row-marker { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ── REVIEWS ─────────────────────────── */
.reviews-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2px; background: var(--border); border: 1px solid var(--border);
    margin-bottom: 96px;
}
.review-card {
    background: var(--white); padding: 28px 28px 24px;
    display: flex; flex-direction: column; gap: 12px;
}
.review-source {
    font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--muted);
}
.review-title { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--text); }
.review-excerpt { font-size: 13px; color: var(--mid); line-height: 1.6; flex: 1; }
.review-meta { font-size: 11px; color: var(--muted); margin-top: auto; }
.review-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--text); border-bottom: 1px solid var(--border);
    padding-bottom: 2px; transition: border-color .2s;
    width: fit-content;
}
.review-link:hover { border-color: var(--text); }
.review-placeholder {
    grid-column: 1/-1; padding: 60px 40px; text-align: center;
    background: var(--white);
    font-size: 13px; color: var(--muted);
}
.review-skeleton {
    grid-column: 1/-1; display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2px;
}
.review-skeleton-card {
    background: var(--white); padding: 28px;
    display: flex; flex-direction: column; gap: 12px;
}
.sk-line {
    height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--border) 25%, #ebe9e2 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: sk-shimmer 1.4s infinite;
}
@keyframes sk-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.sk-line.short { width: 40%; }
.sk-line.long  { width: 90%; }
.sk-line.medium{ width: 65%; }


/* ── OFFRES SIMILAIRES ───────────────── */
.similar-section {
    max-width: 1240px; margin: 0 auto; padding: 0 64px 80px;
}
.similar-header {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 24px;
}
.similar-title {
    font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
    color: var(--muted); display: flex; align-items: center; gap: 12px; flex: 1;
}
.similar-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.similar-all-link {
    font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border);
    padding-bottom: 2px; white-space: nowrap; margin-left: 20px;
    transition: border-color .15s;
}
.similar-all-link:hover { border-color: var(--text); }
.carousel-wrap {
    position: relative;
}
.carousel-track {
    display: flex; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 4px;
    scroll-padding-left: 0;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track .offrio-card { flex: 0 0 200px; scroll-snap-align: start; }
.similar-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px;
}
.carousel-nav {
    display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px;
}
.carousel-btn {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    background: var(--white); border: 1px solid var(--border); cursor: pointer;
    color: var(--text); transition: background .15s, border-color .15s;
}
.carousel-btn:hover { background: var(--text); color: var(--white); border-color: var(--text); }
.carousel-btn:disabled { opacity: .3; cursor: default; }

/* ── OFFRIO CARD (copie fidèle de index.html.twig) ── */
.offrio-card {
    display: flex; flex-direction: column;
    background: var(--white); border: 1px solid var(--border);
    text-decoration: none; color: var(--text);
    transition: border-color .15s, box-shadow .15s; overflow: hidden;
}
.offrio-card:hover { border-color: var(--text); box-shadow: 0 4px 12px rgba(0,0,0,.07); }
.offrio-card-img {
    height: 130px; position: relative; overflow: hidden;
    background: var(--bg); flex-shrink: 0;
}
.offrio-card-img-photo {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: contain; object-position: center; display: block; padding: 6px;
    background: var(--card-bg);
}
.offrio-card-img-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center; color: #C8C6BE;
}
.offrio-card-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; }
.offrio-card-brand-row { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.offrio-card-brand-logo { height: 16px; width: auto; opacity: .7; flex-shrink: 0; }
.offrio-card-brand { font-size: 9px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.offrio-card-name  { font-size: 15px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 2px; }
.offrio-card-motor { font-size: 11px; color: var(--mid); margin-bottom: 10px; }
.offrio-card-sep   { height: 1px; background: var(--border); margin-bottom: 10px; }
.offrio-card-price { font-size: 22px; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.offrio-card-price span { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 1px; }
.offrio-card-deposit { font-size: 11px; color: var(--muted); margin-top: 3px; }
.offrio-card-cta {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 14px; border-top: 1px solid var(--border); margin-top: auto;
    font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--text); transition: background .15s, color .15s;
}
.offrio-card:hover .offrio-card-cta { background: var(--text); color: var(--white); }

/* ── SEO TEXT ────────────────────────── */
.seo-text {
    background: var(--white); border: 1px solid var(--border);
    padding: 28px 32px; margin-bottom: 56px;
}
.seo-text p { font-size: 14px; color: var(--mid); line-height: 1.85; margin-bottom: 10px; }
.seo-text p:last-child { margin-bottom: 0; }

/* ── RESPONSIVE ──────────────────────── */
@media (max-width: 1024px) {
    .nav { padding: 0 40px; }
    .hero { padding: 100px 40px 0; }
    .main { padding: 40px 40px 64px; grid-template-columns: 1fr 320px; gap: 0 36px; }
    .footer { padding: 32px 40px; }
    .hero-content { grid-template-columns: 1fr; gap: 24px; }
    .hero-img-wrap { height: 220px; order: -1; }
}
@media (max-width: 860px) {
    .main { grid-template-columns: 1fr; padding: 32px 32px 64px; }
    .sidebar-col  { grid-column: 1; grid-row: 1; position: static; }
    .content-col  { grid-column: 1; grid-row: 2; }
}
@media (max-width: 768px) {
    .similar-section { padding: 0 20px 48px; }
    .hero { padding: 80px 20px 0; }
    .hero-img-wrap { height: 180px; }
    .hero-title { font-size: clamp(30px, 8vw, 52px); }
    .main { padding: 24px 20px 48px; }
    .history-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .history-table th, .history-table td { padding: 10px 12px; font-size: 13px; white-space: nowrap; }
    .reviews-grid { grid-template-columns: 1fr; }
    .seo-text { padding: 20px; }
}
@media (max-width: 480px) {
    .nav { padding: 0 16px; height: 52px; }
    .hero { padding: 68px 16px 0; }
    .hero-title { font-size: clamp(26px, 9vw, 40px); }
    .hero-subtitle { font-size: 14px; }
    .hero-badges { gap: 6px; }
    .badge { font-size: 9px; padding: 4px 10px; }
    .hero-img-wrap { height: 160px; }
    .main { padding: 16px 16px 40px; }
    .footer { padding: 24px 16px; }
    .sidebar-price-main { font-size: 40px; }
    .section-title { font-size: 10px; margin-bottom: 16px; }
    .history-table th, .history-table td { padding: 8px 10px; font-size: 12px; }
    .review-card { padding: 20px; }
}

/* ── SAVE BLOCK ── */
.sidebar-save-block { background: var(--white); border: 1px solid var(--border); margin-bottom: 16px; overflow: hidden; }

/* step 1 — not saved */
.save-initial { padding: 14px 18px; }
.btn-save-confirm {
    width: 100%; padding: 12px; background: var(--text); color: var(--white); border: none;
    cursor: pointer; font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; transition: opacity .2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-save-confirm:hover { opacity: .8; }
.btn-save-confirm:disabled { opacity: .5; cursor: default; }

/* step 2 — saved */
.save-done-state { display: none; }
.save-done-state.is-visible { display: block; }
.save-done-head { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; }
.save-done-label { font-size: 12px; font-weight: 600; color: #0F7B6C; display: flex; align-items: center; gap: 6px; }
.btn-unsave { font-size: 11px; color: var(--muted); background: none; border: none; cursor: pointer; font-family: 'Inter', sans-serif; padding: 0; }
.btn-unsave:hover { color: #C04C20; text-decoration: underline; }

/* alert row */
.save-alert-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 18px; background: var(--bg); border-top: 1px solid var(--border); }
.save-alert-label { font-size: 12px; font-weight: 600; color: var(--mid); }
.save-toggle { position: relative; display: inline-block; width: 34px; height: 19px; cursor: pointer; flex-shrink: 0; }
.save-toggle input { opacity: 0; width: 0; height: 0; }
.save-toggle-slider { position: absolute; inset: 0; background: var(--border); border-radius: 19px; transition: background .2s; }
.save-toggle-slider::before { content: ''; position: absolute; width: 13px; height: 13px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.save-toggle input:checked + .save-toggle-slider { background: var(--text); }
.save-toggle input:checked + .save-toggle-slider::before { transform: translateX(15px); }

/* scope (visible only when alert on) */
.save-scope-panel { display: none; padding: 12px 18px; border-top: 1px solid var(--border); }
.save-scope-panel.is-visible { display: block; }
.save-scope-lbl { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px; }
.save-scope-opts { display: flex; flex-direction: column; gap: 7px; }
.save-scope-opt { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--text); cursor: pointer; line-height: 1.4; }
.save-scope-opt input { accent-color: var(--text); margin-top: 2px; flex-shrink: 0; }

/* guest */
.save-guest-block { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.btn-save-offer-guest { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 1.5px dashed var(--border); padding: 10px 14px; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; color: var(--mid); letter-spacing: .04em; transition: all .2s; text-align: left; }
.btn-save-offer-guest:hover { border-color: var(--text); color: var(--text); background: var(--bg); }
.save-guest-msg { font-size: 12px; color: var(--mid); line-height: 1.6; display: none; }
.save-guest-msg.is-visible { display: block; }
.save-guest-msg a { color: var(--text); font-weight: 700; }
.save-guest-msg a:hover { text-decoration: underline; }
