(function(){
/* global React */
const { useState, useEffect, useRef } = React;

const T_TEAL = '#11978f';
const T_TEAL_HOVER = '#1c7d77';
const T_TEAL_LIGHT = '#e7fcfb';
const T_INK = '#042828';
const T_MUTED = '#5B7A82';
const T_SURFACE = '#FFFFFF';
const T_CREAM = '#F4F2EC';
const T_BORDER = 'rgba(4,40,40,0.08)';
const T_BORDER_STRONG = 'rgba(4,40,40,0.14)';

const PHOTO_URL = 'https://www.van-away.com/wp-content/uploads/malaga-2p-1600x923-1-1024x591.png';

/* ─── Icons ─────────────────────────────────────────────────── */
const S = { fill:'none', stroke:'currentColor', strokeWidth:1.8, strokeLinecap:'round', strokeLinejoin:'round' };
const ic = {
  users:   <svg viewBox="0 0 24 24" {...S}><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>,
  kitchen: <svg viewBox="0 0 24 24" {...S}><path d="M3 2v7c0 1.1.9 2 2 2h2a2 2 0 0 0 2-2V2"/><path d="M6 2v20"/><path d="M17 2c-1.7 0-3 1.8-3 4v6h3"/><path d="M17 2v20"/></svg>,
  fridge:  <svg viewBox="0 0 24 24" {...S}><rect x="6" y="2" width="12" height="20" rx="2"/><path d="M6 10h12"/><path d="M9 5v2"/><path d="M9 13v3"/></svg>,
  heat:    <svg viewBox="0 0 24 24" {...S}><path d="M12 2s4 4 4 8a4 4 0 0 1-8 0c0-4 4-8 4-8z"/><path d="M12 22a6 6 0 0 0 6-6"/><path d="M12 22a6 6 0 0 1-6-6"/></svg>,
  shower:  <svg viewBox="0 0 24 24" {...S}><path d="M4 22V12a4 4 0 0 1 4-4h1"/><path d="M9 8a3 3 0 0 1 6 0"/><circle cx="13" cy="5" r="0"/><path d="M14 13v.01M17 14v.01M11 14v.01M15 17v.01M12 18v.01M18 18v.01"/></svg>,
  wc:      <svg viewBox="0 0 24 24" {...S}><path d="M6 2v6a4 4 0 0 0 4 4h0"/><path d="M6 12a6 6 0 0 0 6 6v4"/><path d="M18 12V4a2 2 0 0 0-2-2"/><path d="M14 12h6a0 0 0 0 1 0 0 4 4 0 0 1-4 4h0a4 4 0 0 1-4-4z"/></svg>,
  van:     <svg viewBox="0 0 24 24" {...S}><path d="M2 17V8a2 2 0 0 1 2-2h11l4 5v6"/><circle cx="7" cy="18" r="2"/><circle cx="17" cy="18" r="2"/><path d="M9 18h6M2 11h13"/></svg>,
  picnic:  <svg viewBox="0 0 24 24" {...S}><path d="M3 9h18l-2 3H5z"/><path d="M5 12l-2 9M19 12l2 9M8 16h8M7 21h10"/></svg>,
  plug:    <svg viewBox="0 0 24 24" {...S}><path d="M9 2v6M15 2v6"/><path d="M6 8h12v3a6 6 0 0 1-12 0z"/><path d="M12 17v5"/></svg>,
  dishes:  <svg viewBox="0 0 24 24" {...S}><circle cx="12" cy="11" r="8"/><circle cx="12" cy="11" r="4"/><path d="M12 1v4"/></svg>,
  bed:     <svg viewBox="0 0 24 24" {...S}><path d="M2 18V8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10"/><path d="M2 14h20M6 10h5"/><path d="M2 22v-2M22 22v-2"/></svg>,
  baby:    <svg viewBox="0 0 24 24" {...S}><circle cx="12" cy="6" r="3"/><path d="M9 9c-2 1-3 3-3 6v7M15 9c2 1 3 3 3 6v7"/><path d="M9 12h6"/></svg>,
  check:   <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round"><polyline points="20 6 9 17 4 12"/></svg>,
  close:   <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>,
  back:    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"><polyline points="15 18 9 12 15 6"/></svg>,
  chev:    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"><polyline points="6 9 12 15 18 9"/></svg>,
  plus:    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>,
  grid:    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg>,
  ruler:   <svg viewBox="0 0 24 24" {...S}><path d="M3 7l4-4 14 14-4 4z"/><path d="M7 7l2 2M11 9l2 2M15 11l2 2"/></svg>,
  spark:   <svg viewBox="0 0 512 512" fill="currentColor"><path d="M432 32c8.8 0 16 7.2 16 16V96h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V128H368c-8.8 0-16-7.2-16-16s7.2-16 16-16h48V48c0-8.8 7.2-16 16-16zm0 288c8.8 0 16 7.2 16 16v48h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V416H368c-8.8 0-16-7.2-16-16s7.2-16 16-16h48V336c0-8.8 7.2-16 16-16zM136.8 216.4L54.2 254.6l82.6 38.1c6.9 3.2 12.4 8.7 15.6 15.6l38.1 82.6 38.1-82.6c3.2-6.9 8.7-12.4 15.6-15.6l82.6-38.1-82.6-38.1c-6.9-3.2-12.4-8.7-15.6-15.6l-38.1-82.6-38.1 82.6c-3.2 6.9-8.7 12.4-15.6 15.6zM123.4 321.8L9.3 269.1C3.6 266.5 0 260.8 0 254.6s3.6-11.9 9.3-14.5l114.1-52.7L176 73.3c2.6-5.7 8.3-9.3 14.5-9.3s11.9 3.6 14.5 9.3l52.7 114.1L371.8 240c5.7 2.6 9.3 8.3 9.3 14.5s-3.6 11.9-9.3 14.5L257.8 321.8 205.1 435.8c-2.6 5.7-8.3 9.3-14.5 9.3s-11.9-3.6-14.5-9.3L123.4 321.8z"/></svg>,
  pin:     <svg viewBox="0 0 24 24" {...S}><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>,
  cal:     <svg viewBox="0 0 24 24" {...S}><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>,
  clock:   <svg viewBox="0 0 24 24" {...S}><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>,
  quote:   <svg viewBox="0 0 24 24" fill="currentColor" stroke="none"><path d="M7 7H4a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h3l-2 4h3l2-4V8a1 1 0 0 0-1-1zm10 0h-3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h3l-2 4h3l2-4V8a1 1 0 0 0-1-1z"/></svg>,
  shield:  <svg viewBox="0 0 24 24" {...S}><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><path d="M9 12l2 2 4-4"/></svg>,
  road:    <svg viewBox="0 0 24 24" {...S}><path d="M4 22 8 2M20 22 16 2M12 4v3M12 11v3M12 18v2"/></svg>,
  paw:     <svg viewBox="0 0 24 24" {...S}><circle cx="5" cy="11" r="1.6"/><circle cx="19" cy="11" r="1.6"/><circle cx="9" cy="6" r="1.6"/><circle cx="15" cy="6" r="1.6"/><path d="M12 12c-2.5 0-4 2-4 4s1.5 3 4 3 4-1 4-3-1.5-4-4-4z"/></svg>,
  globe:   <svg viewBox="0 0 24 24" {...S}><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3c2.5 2.5 2.5 15 0 18M12 3c-2.5 2.5-2.5 15 0 18"/></svg>,
  lock:    <svg viewBox="0 0 24 24" {...S}><rect x="4" y="11" width="16" height="9" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg>,
  info:    <svg viewBox="0 0 24 24" {...S}><circle cx="12" cy="12" r="10"/><line x1="12" y1="11" x2="12" y2="16"/><circle cx="12" cy="7.7" r="0.6" fill="currentColor"/></svg>,
  checkcircle: <svg viewBox="0 0 24 24" {...S}><circle cx="12" cy="12" r="10"/><path d="M8.5 12l2.5 2.5 4.5-5"/></svg>,
};
function Star({ filled=true }){return <svg width="15" height="15" viewBox="0 0 24 24" fill={filled?'#F5A623':'none'} stroke={filled?'#F5A623':'#cdd6d8'} strokeWidth="1.5" strokeLinejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>;}
function Stars({ n=5 }){return <span className="vdp-stars">{[1,2,3,4,5].map(i=><Star key={i} filled={i<=n}/>)}</span>;}
function Icon({ name, size=18 }){ return <span className="vdp-ic" style={{width:size,height:size}}>{ic[name]||ic.check}</span>; }

/* ─── Mock vehicle (Camper Van Malaga — à corriger via Fleetee) ── */
const VEHICLE = {
  id: 1,
  category_name: 'VAN',
  category_label: 'Campervans',
  display_name: 'Camper Van Malaga',
  tagline: 'Van aménagé Renault ou Volkswagen, pour voyager en couple, ou à trois avec un jeune enfant (moins de 10 ans).',
  daily_price: 55,
  photos: [PHOTO_URL, PHOTO_URL, PHOTO_URL, PHOTO_URL, PHOTO_URL],
  main_specs: [
    { icon:'users',   label:'Jusqu’à 3' },
    { icon:'kitchen', label:'Cuisine et vaisselle' },
    { icon:'fridge',  label:'Frigo' },
    { icon:'heat',    label:'Chauffage' },
    { icon:'shower',  label:'Douchette ext. (chaude en option)' },
    { icon:'wc',      label:'WC portable (option)' },
  ],
  // Dimensions en cm / kg (depuis Fleetee). null = masqué.
  dimensions: { length: 510, width: 230, height: 199, weight: 3000 },
  cross_images: ['Images/coupe-nuit.jpg', 'Images/coupe-dimensions.jpg'],
};

/* Sections thématiques — meta + données mock (à corriger via onglet Caractéristiques) */
const SECTIONS = [
  { key:'vehicle_data', title:'Données véhicule', icon:'van',
    text:"Tous nos véhicules sont récents, munis des équipements les plus modernes, livrés avec le plein d'eau et une bouteille de gaz. Toutes nos locations incluent une assurance tous risques et une assistance 7J/7.",
    items:['Renault Trafic ou VW Transporter','Motorisation Diesel','Boîte manuelle ou automatique','3 places en carte grise','Climatisation cabine','Régulateur de vitesse','Caméra & aide au stationnement'] },
  { key:'equipments', title:'Équipements inclus', icon:'picnic',
    text:"Tous nos véhicules, tentes et caravanes sont munis de tous les accessoires dont vous avez besoin pour votre séjour !",
    items:['Table & 2 chaises de camping','Auvent / store de toit','Kit de nettoyage','Câble électrique 220V','Cales de mise à niveau','Bouteille de gaz'] },
  { key:'electricity', title:"L'électricité", icon:'plug',
    text:"Vous allez voir, tous nos véhicules, tentes de toit et caravanes sont très branchés !",
    items:['Batterie cellule indépendante','Convertisseur 220V','Prises USB','Éclairage LED intérieur','Branchement secteur 220V'] },
  { key:'meals', title:'Pour vos repas', icon:'dishes',
    text:"Tous nos véhicules, tentes de toit et caravanes sont munis de tout ce qu'il vous faut pour de bons repas !",
    items:['Réchaud 2 feux gaz','Évier avec eau courante','Réfrigérateur','Vaisselle 4 personnes','Casseroles & ustensiles','Réservoir eau propre 30 L'] },
  { key:'toilet', title:'Pour votre toilette', icon:'shower',
    text:"Tous nos véhicules et caravanes vous proposent de quoi faire un bon brin de toilette !",
    items:['Douchette extérieure (eau chaude en option)','WC portable (en option)','Réservoir eaux usées','Pommeau & flexible de douche'] },
  { key:'nights', title:'Pour vos nuits', icon:'bed',
    text:"Tous nos véhicules, tentes et caravanes sont équipés pour de bonnes nuits sous les étoiles !",
    items:['Lit double aménagé (1,90 × 1,30 m)','Couette & oreillers','Rideaux / stores occultants','Toit relevable — couchage 2 pers.'] },
  { key:'children', title:'Pour vos enfants', icon:'baby',
    text:"Tous nos véhicules, tentes et caravanes font rêver vos jeunes (ou moins jeunes) enfants !",
    items:['Fixation siège enfant Isofix','Lit enfant (option)','Réhausseur (option)'] },
];

function fmtDim(cm){ return (cm/100).toFixed(2).replace('.', ',') + ' m'; }
function fmtWeight(kg){ return Math.round(kg).toLocaleString('fr-FR') + ' kg'; }

/* Avis clients (mock — Van-Away 4,9 ⭐ / ~3 100 avis Google) */
const REVIEWS = {
  rating: '4,9', count: '3 100',
  items: [
    { name:'Camille R.', date:'Août 2025', stars:5, text:"Van impeccable, super bien équipé. Le couchage est top et la prise en charge à l'agence a été rapide et sympa. On recommande à 100 % !" },
    { name:'Thomas & Léa', date:'Juillet 2025', stars:5, text:"Parfait pour un road-trip à deux. Cuisine complète, frigo nickel, et l'assistance nous a bien rassurés. On reviendra !" },
    { name:'Sophie M.', date:'Juin 2025', stars:5, text:"Première expérience en van réussie. Le Malaga est facile à conduire et hyper pratique au quotidien. Merci l'équipe Van-Away." },
    { name:'Hugo & Marie', date:'Mai 2025', stars:5, text:"Tout était prêt à l'heure, véhicule propre et complet. On a adoré la liberté de partir où on voulait. Un grand merci !" },
    { name:'Nadia B.', date:'Avril 2025', stars:5, text:"Service au top du début à la fin. L'équipe est de bon conseil pour l'itinéraire. Le van est confortable même à trois." },
  ],
};

function ReviewsSection(){
  const trackRef = useRef(null);
  const [active, setActive] = useState(0);
  const items = REVIEWS.items;
  const PER_VIEW = 3;
  const pages = Math.max(1, items.length - PER_VIEW + 1);

  const scrollToIdx = (i)=>{
    const t = trackRef.current; if(!t) return;
    const card = t.children[i]; if(!card) return;
    t.scrollTo({ left: card.offsetLeft - t.offsetLeft, behavior:'smooth' });
  };
  const onScroll = ()=>{
    const t = trackRef.current; if(!t) return;
    let best=0, bestD=Infinity;
    Array.from(t.children).forEach((c,i)=>{
      const d = Math.abs(c.offsetLeft - t.offsetLeft - t.scrollLeft);
      if(d<bestD){ bestD=d; best=i; }
    });
    setActive(Math.min(best, pages-1));
  };

  // Défilement automatique
  const [paused, setPaused] = useState(false);
  useEffect(()=>{
    if(paused) return;
    const id = setInterval(()=>{ setActive(a=>{ const n=(a+1)%pages; scrollToIdx(n); return n; }); }, 4500);
    return ()=>clearInterval(id);
  }, [paused, pages]);

  return (
    <section className="vdp-reviews" onMouseEnter={()=>setPaused(true)} onMouseLeave={()=>setPaused(false)}>
      <div className="vdp-reviews-head">
        <div className="vdp-reviews-headtxt">
          <h2 className="vdp-h2">Ils ont adoré leur road-trip</h2>
          <p className="vdp-reviews-sub">Avis vérifiés de nos voyageurs</p>
        </div>
        <div className="vdp-reviews-score">
          <span className="vdp-reviews-num">{REVIEWS.rating}</span>
          <div className="vdp-reviews-scoremeta">
            <Stars n={5}/>
            <span className="vdp-reviews-count">{REVIEWS.count} avis Google</span>
          </div>
        </div>
      </div>
      <div className="vdp-carousel">
        <div className="vdp-reviews-track" ref={trackRef} onScroll={onScroll}>
          {items.map((r,i)=>(
            <figure key={i} className="vdp-review">
              <span className="vdp-review-quote"><Icon name="quote" size={22}/></span>
              <Stars n={r.stars}/>
              <blockquote className="vdp-review-text">{r.text}</blockquote>
              <figcaption className="vdp-review-by">
                <span className="vdp-review-name">{r.name}</span>
                <span className="vdp-review-date">{r.date}</span>
              </figcaption>
            </figure>
          ))}
        </div>
      </div>

      <div className="vdp-caro-dots">
        {Array.from({length:pages}).map((_,i)=>(
          <button key={i} type="button" className={`vdp-caro-dot ${i===active?'is-active':''}`} onClick={()=>{setActive(i);scrollToIdx(i);}} aria-label={`Page ${i+1}`}/>
        ))}
      </div>
    </section>
  );
}

/* ─── Section bloc (accordion) ─────────────────────── */
function ThemeSection({ sec, mode, openByDefault, variant = 'plain' }){
  const [open, setOpen] = useState(openByDefault);
  const isAccordion = mode === 'accordion';
  const expanded = isAccordion ? open : true;
  const variantClass = variant === 'contrast' ? 'vdp-sec--contrast' : variant === 'teal' ? 'vdp-sec--teal' : '';

  return (
    <div className={`vdp-sec ${expanded?'is-open':''} ${isAccordion?'is-acc':''} ${variantClass}`}>
      <button type="button" className="vdp-sec-head" onClick={()=>isAccordion && setOpen(!open)} aria-expanded={expanded}>
        <span className="vdp-sec-icon"><Icon name={sec.icon} size={20}/></span>
        <span className="vdp-sec-title">{sec.title}</span>
        {isAccordion && <span className={`vdp-sec-chev ${open?'is-open':''}`}><Icon name="plus" size={18}/></span>}
      </button>
      {expanded && (
        <div className="vdp-sec-body">
          <p className="vdp-sec-text">{sec.text}</p>
          <ul className="vdp-sec-list">
            {sec.items.map((it,i)=>(
              <li key={i}><span className="vdp-li-check"><Icon name="check" size={11}/></span>{it}</li>
            ))}
          </ul>
        </div>
      )}
    </div>
  );
}

/* ─── Bandeau réassurance (sous galerie — façon Roadsurfer / van-away) ── */
const REASS = [
  { icon:'shield', label:'Assurance tous risques' },
  { icon:'clock',  label:'Assistance 24h/24 · 7j/7' },
  { icon:'cal',    label:'Annulation flexible' },
  { icon:'road',   label:'Kilométrage inclus' },
];
function ReassStrip({ variant = 'card' }){
  return (
    <div className={`vdp-reass ${variant==='band'?'vdp-reass--band':''}`}>
      {REASS.map((r,i)=>(
        <div key={i} className="vdp-reass-item">
          <span className="vdp-reass-ic"><Icon name={r.icon} size={variant==='band'?20:20}/></span>
          <span className="vdp-reass-lb">{r.label}</span>
        </div>
      ))}
    </div>
  );
}

/* ─── Blocs site van-away.com — repris tel quel ────────────── */
const SITE_INCLUS = ['Partenariat campings Onlycamp','Véhicule fiable et récent','Nettoyage et désinfection professionnels','Assurance tous risques','Assistance 24/7','Stationnements France Passion','Application smartphone – lieux de stationnement','Matériel de camping','Table et chaises incluses','Vaisselle'];
const SITE_CONDITIONS = ['Franchise 2000€','Permis B','Conducteur + de 23 ans','Kilométrage autorisé','Voyage étranger autorisé','Paiements sécurisés','Paiements ANCV','Animaux autorisés'];
const SITE_OPT_ACC = ['Tente de hayon ou cabine douches','Eau chaude','Toilettes sèches','Cafetière','Réchaud gaz + plancha','Convertisseur 220V','Cales','Porte vélo','Autres accessoires disponibles'];
const SITE_OPT_SERV = ['Achat kilomètres supplémentaires','Conducteur supplémentaire','Nettoyage du véhicule à votre retour','Rachat partiel de franchise','Transfert gare ou aéroport','Literie'];

const LOREM = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
function InfoPill({ label, info = LOREM }){
  const [open, setOpen] = useState(false);
  return (
    <span className={`vdp-pill ${open?'is-open':''}`}>
      {label}
      <button type="button" className="vdp-pill-i" aria-label={`Info : ${label}`} aria-expanded={open} onClick={()=>setOpen(o=>!o)}>
        <Icon name="info" size={16}/>
      </button>
      {open && (
        <span className="vdp-pop" role="tooltip">
          <span className="vdp-pop-head">
            <strong>{label}</strong>
            <button type="button" className="vdp-pop-x" aria-label="Fermer" onClick={()=>setOpen(false)}><Icon name="close" size={13}/></button>
          </span>
          <span className="vdp-pop-text">{info}</span>
        </span>
      )}
    </span>
  );
}
function SiteInfoBlocks(){
  return (
    <div className="vdp-site">
      <section className="vdp-siteblock">
        <h2 className="vdp-site-h"><Icon name="spark" size={22}/> Inclus dans votre location</h2>
        <div className="vdp-pills">{SITE_INCLUS.map((l,i)=><InfoPill key={i} label={l}/>)}</div>
      </section>
      <section className="vdp-siteblock">
        <h2 className="vdp-site-h"><Icon name="checkcircle" size={22}/> Conditions de location</h2>
        <div className="vdp-pills">{SITE_CONDITIONS.map((l,i)=><InfoPill key={i} label={l}/>)}</div>
      </section>
      <section className="vdp-siteblock">
        <h2 className="vdp-site-h"><Icon name="checkcircle" size={22}/> En options</h2>
        <div className="vdp-optsub">
          <span className="vdp-opt-label">Accessoires</span>
          <div className="vdp-pills">{SITE_OPT_ACC.map((l,i)=><InfoPill key={i} label={l}/>)}</div>
        </div>
        <div className="vdp-optsub">
          <span className="vdp-opt-label">Services</span>
          <div className="vdp-pills">{SITE_OPT_SERV.map((l,i)=><InfoPill key={i} label={l}/>)}</div>
        </div>
      </section>
    </div>
  );
}

/* ─── Main page ────────────────────────────────────────────── */
function VehicleDetailPage({ vehicle = VEHICLE, compact = false, sectionsDisplay = 'accordion', sectionsStyle = 'accordion', reviews = 'section', encart = 'recap', availabilityBadge = true, reassStrip = 'card', conditions = true, onClose, onSelect }){
  const [heroIdx, setHeroIdx] = useState(0);
  const v = vehicle;
  const dim = v.dimensions || {};
  const dimRows = [
    dim.length ? { label:'Longueur', value: fmtDim(dim.length) } : null,
    dim.width  ? { label:'Largeur',  value: fmtDim(dim.width)  } : null,
    dim.height ? { label:'Hauteur',  value: fmtDim(dim.height) } : null,
    dim.weight ? { label:'Poids',    value: fmtWeight(dim.weight) } : null,
  ].filter(Boolean);

  // Récap voyage (mock — repris du tunnel : agence + dates choisies en amont)
  const trip = { agency:'Bordeaux', startDate:'2026-07-11', endDate:'2026-07-19', days:8 };
  const totalStay = v.daily_price * trip.days;
  const pricePerDay = Math.round(totalStay / trip.days);
  const fmtD = window.fmtDate || ((iso)=>iso);

  const sec = SECTIONS; // toutes affichées (mode véhicule)
  const photos = v.photos && v.photos.length ? v.photos : [PHOTO_URL];
  const mosaic = photos.length >= 5 ? photos.slice(0,5) : [...photos, ...Array(5-photos.length).fill(photos[0])];

  return (
    <div className={`vdp ${compact?'is-compact':''}`}>
      {/* Top bar */}
      <div className="vdp-topbar">
        <button type="button" className="vdp-back" onClick={onClose}>
          <Icon name="back" size={18}/> Retour à la liste
        </button>
        <button type="button" className="vdp-close" onClick={onClose} aria-label="Fermer"><Icon name="close" size={18}/></button>
      </div>

      <div className="vdp-scroll">
        {/* Gallery mosaic */}
        <div className="vdp-mosaic">
          <button type="button" className="vdp-mosaic-hero" onClick={()=>setHeroIdx(0)}>
            <img src={mosaic[0]} alt={v.display_name}/>
            <span className="vdp-mosaic-cta"><Icon name="grid" size={14}/> Voir la galerie</span>
          </button>
          <div className="vdp-mosaic-grid">
            {[1,2,3,4].map(i=>(
              <button key={i} type="button" className="vdp-mosaic-thumb"><img src={mosaic[i]} alt={`${v.display_name} ${i}`}/></button>
            ))}
          </div>
        </div>

        {reassStrip && reassStrip !== 'off' && <ReassStrip variant={reassStrip}/>}

        {/* Body: 2 columns */}
        <div className="vdp-body">
          <div className="vdp-main">
            {/* Title block */}
            <div className="vdp-titleblock">
              <span className="vdp-cat"><Icon name="van" size={15}/> {v.category_label}</span>
              <h1 className="vdp-title">{v.display_name}</h1>
              {v.tagline && <p className="vdp-tagline">{v.tagline}</p>}
            </div>

            {/* Caractéristiques principales */}
            <section className="vdp-block">
              <h2 className="vdp-h2"><Icon name="spark" size={18}/> Caractéristiques principales</h2>
              <div className="vdp-mainspecs">
                {v.main_specs.map((s,i)=>(
                  <div key={i} className="vdp-mspec">
                    <span className="vdp-mspec-ic"><Icon name={s.icon} size={22}/></span>
                    <span className="vdp-mspec-lb">{s.label}</span>
                  </div>
                ))}
              </div>
            </section>

            {/* Plan de coupe + dimensions */}
            <section className="vdp-block">
              <h2 className="vdp-h2"><Icon name="ruler" size={18}/> Aménagement & dimensions</h2>
              <div className="vdp-coupe">
                {(v.cross_images||[]).map((src,i)=>(
                  <figure key={i} className="vdp-coupe-img">
                    <img src={src} alt={`Plan de coupe ${i+1}`}/>
                    <figcaption>{i===0 ? 'Configuration nuit' : 'Configuration jour'}</figcaption>
                  </figure>
                ))}
              </div>
              {dimRows.length>0 && (
                <div className="vdp-dims">
                  {dimRows.map(d=>(
                    <div key={d.label} className="vdp-dim">
                      <span className="vdp-dim-lb">{d.label}</span>
                      <span className="vdp-dim-val">{d.value}</span>
                    </div>
                  ))}
                </div>
              )}
            </section>

            {/* Thematic sections */}
            <section className="vdp-block">
              <div className="vdp-secs">
                {sec.map((sc,i)=>(
                  <ThemeSection key={sc.key} sec={sc} mode="accordion" openByDefault={i===0} variant={sectionsStyle==='accordion2'?'contrast':sectionsStyle==='accordion3'?'teal':'plain'}/>
                ))}
              </div>
            </section>

            {conditions && <SiteInfoBlocks/>}
          </div>

          {/* Sticky price encart */}
          <aside className="vdp-aside">
            <div className="vdp-encart">
              {availabilityBadge && (
                <span className="vdp-avail"><Icon name="check" size={13}/> Disponible pour vos dates</span>
              )}
              <div className="vdp-encart-price">
                <span className="vdp-encart-num">{pricePerDay} €</span>
                <span className="vdp-encart-per">/ jour</span>
              </div>
              <p className="vdp-encart-note">Assurance tous risques comprise · hors options</p>

              {encart === 'recap' && (
                <div className="vdp-encart-recap">
                  <div className="vdp-recap-row"><span className="vdp-recap-ic"><Icon name="pin" size={15}/></span>Agence de {trip.agency}</div>
                  <div className="vdp-recap-row"><span className="vdp-recap-ic"><Icon name="cal" size={15}/></span>{fmtD(trip.startDate)} → {fmtD(trip.endDate)}</div>
                  <div className="vdp-recap-row"><span className="vdp-recap-ic"><Icon name="clock" size={15}/></span>{trip.days} jours de location</div>
                  <div className="vdp-recap-total"><span>Soit</span><strong>{totalStay} €</strong><span>pour {trip.days} jours</span></div>
                </div>
              )}

              <button className="vdp-cta" onClick={()=>onSelect && onSelect(v.id)}>Sélectionner ce véhicule</button>
              <div className="vdp-encart-reass">
                <span><Icon name="check" size={13}/> Annulation flexible</span>
                <span><Icon name="check" size={13}/> Assistance 7j/7</span>
                <span><Icon name="check" size={13}/> Kilométrage inclus</span>
              </div>
            </div>
          </aside>
        </div>

        {reviews === 'section' && <ReviewsSection/>}
      </div>

      {/* Mobile sticky bottom bar */}
      <div className="vdp-bottombar">
        <div className="vdp-bb-price">
          <span className="vdp-bb-from">Prix par jour</span>
          <span className="vdp-bb-num">{pricePerDay} €<small>/jour</small></span>
        </div>
        <button className="vdp-cta vdp-bb-cta" onClick={()=>onSelect && onSelect(v.id)}>Sélectionner</button>
      </div>

      <style>{`
        .vdp{font-family:'Barlow',Helvetica,sans-serif;color:${T_INK};background:#fafaf6;width:100%;display:flex;flex-direction:column;min-height:100%}
        .vdp *{box-sizing:border-box}
        .vdp-ic{display:inline-flex;align-items:center;justify-content:center}
        .vdp-ic svg{width:100%;height:100%;display:block}

        /* Top bar */
        .vdp-topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;padding:12px 28px;background:rgba(255,255,255,.92);backdrop-filter:blur(8px);border-bottom:1px solid ${T_BORDER}}
        .vdp-back{display:inline-flex;align-items:center;gap:8px;background:none;border:none;color:${T_INK};font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;padding:6px 4px;transition:color .2s}
        .vdp-back:hover{color:${T_TEAL}}
        .vdp-back .vdp-ic{color:${T_TEAL}}
        .vdp-close{width:36px;height:36px;border-radius:999px;background:#fff;border:1px solid ${T_BORDER_STRONG};display:flex;align-items:center;justify-content:center;cursor:pointer;color:${T_INK};transition:all .2s}
        .vdp-close:hover{border-color:${T_TEAL};color:${T_TEAL}}

        .vdp-scroll{flex:1;max-width:1280px;width:100%;margin:0 auto;padding:24px 28px 40px}

        /* Mosaic */
        .vdp-mosaic{display:grid;grid-template-columns:1.5fr 1fr;gap:12px;height:420px}
        .vdp-mosaic-hero{position:relative;border:0;padding:0;cursor:pointer;overflow:hidden;background:${T_CREAM};border-radius:18px}
        .vdp-mosaic-hero img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease}
        .vdp-mosaic-hero:hover img{transform:scale(1.03)}
        .vdp-mosaic-cta{position:absolute;left:16px;bottom:16px;display:inline-flex;align-items:center;gap:7px;padding:9px 16px;background:${T_TEAL};color:#fff;border-radius:999px;font-size:14px;font-weight:600;box-shadow:0 4px 14px rgba(4,40,40,.22);transition:all .2s}
        .vdp-mosaic-hero:hover .vdp-mosaic-cta{background:${T_TEAL_HOVER};transform:translateY(-1px)}
        .vdp-mosaic-grid{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:12px}
        .vdp-mosaic-thumb{position:relative;border:0;padding:0;cursor:pointer;overflow:hidden;background:${T_CREAM};border-radius:14px}
        .vdp-mosaic-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease}
        .vdp-mosaic-thumb:hover img{transform:scale(1.05)}

        /* Body */
        .vdp-body{display:grid;grid-template-columns:1fr 360px;gap:40px;margin-top:36px;align-items:start}
        .vdp-main{min-width:0;display:flex;flex-direction:column;gap:36px}

        .vdp-titleblock{display:flex;flex-direction:column;gap:10px}
        .vdp-cat{display:inline-flex;align-self:flex-start;align-items:center;gap:6px;padding:6px 14px;background:${T_TEAL_LIGHT};color:${T_TEAL};border-radius:999px;font-size:13px;font-weight:600}
        .vdp-cat .vdp-ic{color:${T_TEAL}}
        .vdp-title{font-size:40px;font-weight:900;line-height:1.05;margin:0;letter-spacing:-.01em}
        .vdp-tagline{font-size:16px;color:${T_MUTED};line-height:1.5;margin:0;max-width:62ch}

        .vdp-block{display:flex;flex-direction:column;gap:18px}
        .vdp-h2{display:flex;align-items:center;gap:10px;font-size:21px;font-weight:700;margin:0}
        .vdp-h2 .vdp-ic{color:${T_TEAL}}

        /* Main specs grid */
        .vdp-mainspecs{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;background:${T_TEAL_LIGHT};border-radius:18px;padding:24px}
        .vdp-mspec{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:6px}
        .vdp-mspec-ic{color:${T_TEAL};display:inline-flex}
        .vdp-mspec-lb{font-size:14px;font-weight:600;line-height:1.3}

        /* Coupe */
        .vdp-coupe{display:grid;grid-template-columns:1fr 1fr;gap:16px}
        .vdp-coupe-img{margin:0;background:#fff;border:1px solid ${T_BORDER};border-radius:16px;overflow:hidden;display:flex;flex-direction:column}
        .vdp-coupe-img img{width:100%;height:auto;display:block;background:#fff}
        .vdp-coupe-img figcaption{font-size:12px;font-weight:600;color:${T_MUTED};text-align:center;padding:8px 10px;border-top:1px solid ${T_BORDER}}
        .vdp-dims{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
        .vdp-dim{display:flex;flex-direction:column;gap:3px;background:#fff;border:1px solid ${T_BORDER};border-radius:12px;padding:14px 16px}
        .vdp-dim-lb{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:${T_MUTED}}
        .vdp-dim-val{font-size:20px;font-weight:900;color:${T_INK}}

        /* Thematic sections */
        .vdp-secs{display:flex;flex-direction:column;gap:12px}
        .vdp-sec{background:#fff;border:1px solid ${T_BORDER};border-radius:16px;overflow:hidden}
        .vdp-sec-head{width:100%;display:flex;align-items:center;gap:14px;padding:18px 20px;background:none;border:none;font-family:inherit;text-align:left;color:${T_INK};cursor:default}
        .vdp-sec.is-acc .vdp-sec-head{cursor:pointer}
        .vdp-sec-icon{display:inline-flex;width:40px;height:40px;border-radius:11px;background:${T_TEAL_LIGHT};color:${T_TEAL};align-items:center;justify-content:center;flex-shrink:0}
        .vdp-sec-title{font-size:17px;font-weight:700;flex:1}
        .vdp-sec-chev{width:28px;height:28px;border-radius:999px;border:1px solid ${T_BORDER_STRONG};display:inline-flex;align-items:center;justify-content:center;color:${T_TEAL};flex-shrink:0;transition:transform .25s ease,background .2s}
        .vdp-sec-chev.is-open{transform:rotate(45deg);background:${T_TEAL_LIGHT}}
        /* Accordéon — version contraste */
        .vdp-sec--contrast{border-color:${T_BORDER_STRONG}}
        .vdp-sec--contrast.is-open{border-color:${T_TEAL};box-shadow:0 4px 18px rgba(17,151,143,.10)}
        .vdp-sec--contrast.is-open .vdp-sec-head{background:${T_TEAL};border-bottom:1px solid ${T_TEAL}}
        .vdp-sec--contrast.is-open .vdp-sec-title{color:#fff}
        .vdp-sec--contrast.is-open .vdp-sec-icon{background:rgba(255,255,255,.18);color:#fff}
        .vdp-sec--contrast.is-open .vdp-sec-chev{transform:rotate(45deg);border-color:rgba(255,255,255,.5);background:rgba(255,255,255,.18);color:#fff}
        .vdp-sec--contrast .vdp-sec-title{font-weight:700;letter-spacing:.01em}
        /* Accordéon — version teal (teal uniquement sur l'entête) */
        .vdp-sec--teal .vdp-sec-head{background:${T_TEAL_LIGHT}}
        .vdp-sec--teal .vdp-sec-icon{background:#fff;color:${T_TEAL}}
        .vdp-sec--teal .vdp-sec-title{color:${T_INK}}
        .vdp-sec--teal .vdp-sec-chev{border-color:rgba(17,151,143,.3);background:#fff;color:${T_TEAL}}
        .vdp-sec--teal.is-open{border-color:${T_TEAL};box-shadow:0 4px 18px rgba(17,151,143,.12)}
        .vdp-sec--teal.is-open .vdp-sec-chev{transform:rotate(45deg);background:${T_TEAL};border-color:${T_TEAL};color:#fff}
        .vdp-sec--teal .vdp-sec-body{border-top:1px solid ${T_BORDER}}
        .vdp-sec-body{padding:14px 20px 20px 74px}
        .vdp-sec-text{font-size:14px;color:${T_MUTED};line-height:1.55;margin:0 0 14px}
        .vdp-sec-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:8px 22px}
        .vdp-sec-list li{display:flex;align-items:flex-start;gap:9px;font-size:14px;font-weight:600;line-height:1.35}
        .vdp-li-check{width:18px;height:18px;border-radius:999px;background:${T_TEAL_LIGHT};color:${T_TEAL};display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}

        /* Aside encart */
        .vdp-aside{position:sticky;top:80px}
        .vdp-encart{background:#fff;border:1px solid ${T_BORDER};border-radius:20px;padding:26px;box-shadow:0 1px 2px rgba(4,40,40,.04),0 8px 30px rgba(4,40,40,.07);display:flex;flex-direction:column;gap:6px}
        .vdp-encart-from{font-size:13px;color:${T_MUTED};font-weight:600}
        .vdp-avail{display:inline-flex;align-self:flex-start;align-items:center;gap:7px;padding:6px 12px;margin-bottom:4px;background:${T_TEAL_LIGHT};color:${T_TEAL};border-radius:999px;font-size:12.5px;font-weight:700}
        .vdp-avail .vdp-ic{color:${T_TEAL}}
        .vdp-encart-recap{display:flex;flex-direction:column;gap:10px;margin:4px 0 18px;padding:16px;background:#fafaf6;border:1px solid ${T_BORDER};border-radius:14px}
        .vdp-recap-row{display:flex;align-items:center;gap:10px;font-size:13.5px;font-weight:600;color:${T_INK}}
        .vdp-recap-ic{width:26px;height:26px;border-radius:8px;background:#fff;border:1px solid ${T_BORDER};color:${T_TEAL};display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
        .vdp-recap-total{display:flex;align-items:baseline;gap:6px;margin-top:4px;padding-top:12px;border-top:1px solid ${T_BORDER};font-size:13px;color:${T_MUTED};font-weight:600}
        .vdp-recap-total strong{font-size:19px;font-weight:900;color:${T_INK}}
        .vdp-encart-price{display:flex;align-items:baseline;gap:6px}
        .vdp-encart-num{font-size:42px;font-weight:900;color:${T_TEAL};line-height:1;letter-spacing:-.02em}
        .vdp-encart-per{font-size:16px;color:${T_MUTED};font-weight:600}
        .vdp-encart-note{font-size:12px;color:${T_MUTED};margin:6px 0 16px;line-height:1.4}
        .vdp-cta{width:100%;padding:15px 22px;background:${T_TEAL};border:none;border-radius:999px;color:#fff;font-family:inherit;font-size:16px;font-weight:600;cursor:pointer;transition:all .25s cubic-bezier(.4,0,.2,1);box-shadow:0 2px 10px rgba(17,151,143,.28)}
        .vdp-cta:hover{background:${T_TEAL_HOVER};transform:translateY(-1px);box-shadow:0 8px 22px rgba(17,151,143,.34)}
        .vdp-encart-reass{display:flex;flex-direction:column;gap:9px;margin-top:18px;padding-top:18px;border-top:1px solid ${T_BORDER}}
        .vdp-encart-reass span{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:600;color:${T_INK}}
        .vdp-encart-reass .vdp-ic{color:${T_TEAL};background:${T_TEAL_LIGHT};border-radius:999px;width:20px;height:20px;padding:4px}

        /* Reassurance strip (sous galerie) */
        .vdp-reass{display:grid;grid-template-columns:repeat(4,1fr);gap:0;margin-top:18px;background:#fff;border:1px solid ${T_BORDER};border-radius:16px;overflow:hidden;box-shadow:0 1px 2px rgba(4,40,40,.04)}
        .vdp-reass-item{display:flex;align-items:center;gap:12px;padding:16px 20px}
        .vdp-reass-item+.vdp-reass-item{border-left:1px solid ${T_BORDER}}
        .vdp-reass-ic{width:38px;height:38px;border-radius:11px;background:${T_TEAL_LIGHT};color:${T_TEAL};display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
        .vdp-reass-lb{font-size:13.5px;font-weight:700;line-height:1.25}
        /* Réassurance — version bandeau teal */
        .vdp-reass--band{background:${T_TEAL_LIGHT};border:none;box-shadow:none}
        .vdp-reass--band .vdp-reass-item{justify-content:center;padding:15px 16px}
        .vdp-reass--band .vdp-reass-item+.vdp-reass-item{border-left:none}
        .vdp-reass--band .vdp-reass-ic{width:auto;height:auto;background:none;border-radius:0;color:${T_TEAL}}
        .vdp-reass--band .vdp-reass-lb{color:${T_INK}}

        /* Blocs site (Inclus / Conditions / En options) — repris tel quel */
        .vdp-site{display:flex;flex-direction:column;gap:0}
        .vdp-siteblock{display:flex;flex-direction:column;gap:20px;padding:34px 0}
        .vdp-siteblock:first-child{padding-top:6px}
        .vdp-siteblock+.vdp-siteblock{border-top:1px solid ${T_BORDER}}
        .vdp-site-h{display:flex;align-items:center;gap:12px;font-size:26px;font-weight:700;color:${T_INK};margin:0;letter-spacing:-.01em}
        .vdp-site-h .vdp-ic{color:${T_INK};flex-shrink:0}
        .vdp-pills{display:flex;flex-wrap:wrap;gap:12px}
        .vdp-pill{position:relative;display:inline-flex;align-items:center;gap:10px;padding:11px 18px;border:1.5px solid ${T_TEAL};border-radius:999px;color:${T_TEAL};font-size:15px;font-weight:700;background:#fff;line-height:1.2}
        .vdp-pill.is-open{background:${T_TEAL_LIGHT}}
        .vdp-pill-i{color:${T_TEAL};opacity:.85;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;background:none;border:none;padding:2px;margin:-2px -2px -2px 0;cursor:pointer;border-radius:999px;transition:opacity .2s}
        .vdp-pill-i:hover{opacity:1}
        .vdp-pop{position:absolute;bottom:calc(100% + 10px);left:0;z-index:30;width:max-content;max-width:280px;display:flex;flex-direction:column;gap:6px;padding:14px 16px;background:#fff;border:1px solid ${T_BORDER_STRONG};border-radius:14px;box-shadow:0 8px 30px rgba(4,40,40,.16);text-align:left;cursor:default}
        .vdp-pop::after{content:'';position:absolute;top:100%;left:22px;border:7px solid transparent;border-top-color:#fff;filter:drop-shadow(0 1px 0 ${T_BORDER_STRONG})}
        .vdp-pop-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
        .vdp-pop-head strong{font-size:14px;font-weight:900;color:${T_INK}}
        .vdp-pop-x{width:22px;height:22px;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;border-radius:999px;color:${T_MUTED};cursor:pointer;transition:all .2s}
        .vdp-pop-x:hover{background:${T_CREAM};color:${T_INK}}
        .vdp-pop-text{font-size:13px;font-weight:400;color:${T_MUTED};line-height:1.5}
        .vdp-optsub{display:flex;flex-direction:column;gap:12px}
        .vdp-optsub+.vdp-optsub{margin-top:8px}
        .vdp-opt-label{font-size:16px;font-weight:700;color:${T_INK}}

        /* Stars */
        .vdp-stars{display:inline-flex;gap:2px;line-height:0}

        /* Reviews */
        .vdp-reviews{margin-top:44px;padding-top:36px;border-top:1px solid ${T_BORDER}}
        .vdp-reviews-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;flex-wrap:wrap;margin-bottom:22px}
        .vdp-reviews-sub{font-size:14px;color:${T_MUTED};margin:6px 0 0}
        .vdp-reviews-score{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid ${T_BORDER};border-radius:14px;padding:12px 18px;box-shadow:0 1px 2px rgba(4,40,40,.04)}
        .vdp-reviews-num{font-size:40px;font-weight:900;color:${T_TEAL};line-height:1}
        .vdp-reviews-scoremeta{display:flex;flex-direction:column;gap:4px}
        .vdp-reviews-count{font-size:12.5px;color:${T_MUTED};font-weight:600}
        /* Reviews carousel */
        .vdp-carousel{position:relative}
        .vdp-reviews-track{display:flex;gap:18px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;padding:6px 2px;-ms-overflow-style:none;scrollbar-width:none}
        .vdp-reviews-track::-webkit-scrollbar{display:none}
        .vdp-reviews-track .vdp-review{flex:0 0 calc((100% - 36px)/3);scroll-snap-align:start}
        .vdp-caro-dots{display:flex;justify-content:center;gap:8px;margin-top:20px}
        .vdp-caro-dot{width:8px;height:8px;border-radius:999px;border:none;padding:0;background:${T_BORDER_STRONG};cursor:pointer;transition:all .25s ease}
        .vdp-caro-dot.is-active{width:24px;background:${T_TEAL}}
        .vdp-review{position:relative;margin:0;background:#fff;border:1px solid ${T_BORDER};border-radius:16px;padding:22px 22px 20px;display:flex;flex-direction:column;gap:12px;box-shadow:0 1px 2px rgba(4,40,40,.04)}
        .vdp-review-quote{position:absolute;top:18px;right:20px;color:${T_TEAL_LIGHT}}
        .vdp-review-text{font-size:14px;line-height:1.55;color:${T_INK};margin:0;font-weight:500}
        .vdp-review-by{display:flex;flex-direction:column;gap:2px;margin-top:auto}
        .vdp-review-name{font-size:14px;font-weight:700}
        .vdp-review-date{font-size:12px;color:${T_MUTED};font-weight:600}

        /* Bottom bar (mobile only) */
        .vdp-bottombar{display:none}

        /* ─── Compact / mobile ─────────────────────────────── */
        .vdp.is-compact .vdp-topbar{padding:10px 16px}
        .vdp.is-compact .vdp-back{font-size:13px}
        .vdp.is-compact .vdp-scroll{padding:16px 16px 90px}
        .vdp.is-compact .vdp-mosaic{grid-template-columns:1fr;height:auto;gap:8px}
        .vdp.is-compact .vdp-mosaic-hero{aspect-ratio:4/3;border-radius:14px}
        .vdp.is-compact .vdp-mosaic-grid{grid-template-columns:repeat(4,1fr);grid-template-rows:1fr;gap:6px;height:70px}
        .vdp.is-compact .vdp-mosaic-thumb{border-radius:10px}
        .vdp.is-compact .vdp-body{grid-template-columns:1fr;gap:28px;margin-top:24px}
        .vdp.is-compact .vdp-title{font-size:27px}
        .vdp.is-compact .vdp-tagline{font-size:15px}
        .vdp.is-compact .vdp-h2{font-size:18px}
        .vdp.is-compact .vdp-mainspecs{grid-template-columns:repeat(2,1fr);padding:18px;gap:10px}
        .vdp.is-compact .vdp-coupe{grid-template-columns:1fr}
        .vdp.is-compact .vdp-dims{grid-template-columns:repeat(2,1fr)}
        .vdp.is-compact .vdp-sec-body{padding:12px 18px 18px 18px}
        .vdp.is-compact .vdp-sec-list{grid-template-columns:1fr}
        .vdp.is-compact .vdp-aside{display:none}
        .vdp.is-compact .vdp-reass{grid-template-columns:1fr 1fr;margin-top:12px}
        .vdp.is-compact .vdp-reass-item{padding:13px 14px;gap:10px}
        .vdp.is-compact .vdp-reass-item:nth-child(odd){border-left:none}
        .vdp.is-compact .vdp-reass-item:nth-child(n+3){border-top:1px solid ${T_BORDER}}
        .vdp.is-compact .vdp-reass-ic{width:32px;height:32px}
        .vdp.is-compact .vdp-reass-lb{font-size:12.5px}
        .vdp.is-compact .vdp-seccards{grid-template-columns:1fr}
        .vdp.is-compact .vdp-site-h{font-size:21px}
        .vdp.is-compact .vdp-siteblock{padding:26px 0;gap:16px}
        .vdp.is-compact .vdp-pill{font-size:14px;padding:9px 14px}
        .vdp.is-compact .vdp-reviews{margin-top:32px;padding-top:28px}
        .vdp.is-compact .vdp-reviews-track .vdp-review{flex:0 0 82%}
        .vdp.is-compact .vdp-reviews-head{margin-bottom:18px}
        .vdp.is-compact .vdp-bottombar{display:flex;position:sticky;bottom:0;z-index:20;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;background:#fff;border-top:1px solid ${T_BORDER};box-shadow:0 -2px 14px rgba(4,40,40,.07)}
        .vdp.is-compact .vdp-bb-price{display:flex;flex-direction:column;line-height:1.05}
        .vdp.is-compact .vdp-bb-from{font-size:11px;color:${T_MUTED};font-weight:600}
        .vdp.is-compact .vdp-bb-num{font-size:22px;font-weight:900;color:${T_TEAL}}
        .vdp.is-compact .vdp-bb-num small{font-size:12px;color:${T_MUTED};font-weight:600}
        .vdp.is-compact .vdp-bb-cta{width:auto;flex:1;max-width:60%;font-size:15px;padding:13px 18px}
      `}</style>
    </div>
  );
}

Object.assign(window, { VehicleDetailPage });

})();
