/* Configurateur v2 — en-tête animé, chargement, barre connexion, récap vide, apparitions douces.
   Tout est limité à .dvzb. « Réduire les animations » : tout reste en place, rien ne bouge. */

/* La page v2 a son propre en-tête : celui du thème (fil d'Ariane + titre) est masqué */
body.dvzb-on .app-head{display:none}
body.dvzb-on .app-body{padding-top:16px}
body.dvzb-modal #dvz-fw{display:none!important} /* bouton WhatsApp flottant caché pendant le choix d'un produit */

/* ── En-tête : texte à gauche, carte mère du client à droite ──
   La carte mère reprend le dessin de l'en-tête v1.6 (templates/partials/builder-hero.php) mais ici elle suit la config :
   chaque pièce choisie se pose dans son emplacement, le courant passe quand les pièces principales sont là. */
.dvzb .hero{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;align-items:center;margin:0 0 22px;padding:20px;border:1px solid var(--line);border-radius:24px;background:#fff}
.dvzb .hero-txt{text-align:left}
.dvzb .hero-crumbs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px;font-size:.8rem;color:var(--muted)}
.dvzb .hero-crumbs a{color:var(--ink2);text-decoration:none}
.dvzb .hero-crumbs a:hover{color:var(--accent)}
.dvzb .hero h1{margin:0;color:var(--ink);font-size:clamp(1.9rem,5.6vw,2.9rem);line-height:1.08;font-weight:800;letter-spacing:-.03em;text-transform:none}
.dvzb .hero h1 em{font-style:normal;color:var(--accent)}
.dvzb .hero-lead{max-width:48ch;margin:12px 0 0;color:var(--ink2);font-size:1rem;line-height:1.6}
.dvzb .hero-chips{display:flex;flex-wrap:wrap;gap:6px;margin:16px 0 0;padding:0;list-style:none}
.dvzb .hero-chips li{margin:0;padding:6px 12px;border-radius:99px;background:var(--soft);font-size:.82rem;font-weight:600;color:var(--ink2)}
.dvzb .hero-chips b{color:var(--accent)}
.dvzb .hero-board{position:relative;margin:0;padding:14px 12px 10px;border-radius:18px;background:#F7F6FD}
.dvzb .hero-board figcaption{margin-top:8px;text-align:center;font-size:.8rem;font-weight:600;color:var(--muted);transition:color .3s}
.dvzb.is-complete .hero-board figcaption{color:var(--ok)}
/* le dessin (partial) : on garde son SVG, sans sa carte */
.dvzb .dvz-hero{margin:0;padding:0;border:0;border-radius:0;background:none;line-height:0}
.dvzb .dvz-hero__svg{display:block;width:100%;height:auto;overflow:visible}
.dvzb .h-board{fill:#fff;stroke:#DCD8F3;stroke-width:1.5;transition:fill .4s,stroke .4s}
.dvzb.has-motherboard .h-board{fill:#EEEBFF;stroke:#BDB5EE}
.dvzb .h-hole{fill:#fff;stroke:#DCD8F3;stroke-width:1.5}
.dvzb .h-traces{fill:none;stroke:#DCD8F3;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dvzb .h-socket{fill:#fff;stroke:#BDB5EE;stroke-width:1.5;stroke-dasharray:4 3}
.dvzb .h-slot{fill:#fff;stroke:#BDB5EE;stroke-width:1.5}
.dvzb .h-chip{fill:#fff;stroke:#DCD8F3;stroke-width:1.5}
.dvzb .h-psu rect:first-child{fill:#fff;stroke:#C9CCD8;stroke-width:2;stroke-dasharray:5 4;transition:stroke .3s}
.dvzb.has-psu .h-psu rect:first-child{stroke:#14102B;stroke-dasharray:none}
.dvzb .h-fan,.dvzb .h-fan-blade{fill:none;stroke:#B9BCCB;stroke-width:1.5;stroke-linecap:round}
.dvzb .h-cpu-body{fill:#fff;stroke:#14102B;stroke-width:2}
.dvzb .h-cpu-ihs{fill:#4933D1}
.dvzb .h-ram-body,.dvzb .h-gpu-body{fill:#14102B}
.dvzb .h-gpu-fan{fill:none;stroke:#4B4766;stroke-width:2}
.dvzb .h-led{fill:#C9CCD8;transition:fill .3s .35s}
/* pièces : absentes tant qu'elles ne sont pas choisies, puis elles se posent */
.dvzb .h-part{opacity:0;transform:translateY(-16px);transition:opacity .35s,transform .45s cubic-bezier(.2,.8,.3,1)}
.dvzb .h-gpu{transform:translateX(30px)}
.dvzb.has-cpu .h-cpu,.dvzb.has-ram .h-ram1,.dvzb.has-ram2 .h-ram2,.dvzb.has-gpu .h-gpu{opacity:1;transform:none}
.dvzb.has-cpu .h-cpu .h-led,.dvzb.has-ram .h-ram1 .h-led,.dvzb.has-ram2 .h-ram2 .h-led,.dvzb.has-gpu .h-gpu .h-led,.dvzb.has-psu .h-psu .h-led{fill:#22D3EE}
/* courant : une impulsion quand processeur + carte mère + mémoire + alimentation sont là, puis toutes les 6 s */
.dvzb .h-pulse{fill:none;stroke:#4933D1;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16 120;stroke-dashoffset:16;opacity:0}
/* v1.5.13 : la carte vit en continu — signal léger à vide, courant violet une fois alimentée */
.dvzb .h-pulse{animation:dvzb-pulse 3.2s linear .4s infinite;stroke:#8B7CF0;stroke-width:2.5}
.dvzb.is-powered .h-pulse{stroke:#4933D1;stroke-width:3;animation-duration:2.4s}
@keyframes dvzb-pulse{0%{opacity:1;stroke-dashoffset:16}40%{opacity:1}42%{opacity:0;stroke-dashoffset:-104}100%{opacity:0;stroke-dashoffset:-104}}
/* emplacements vides : pointillés qui défilent ; ventilateur qui tourne une fois l'alimentation posée */
.dvzb .h-socket,.dvzb .h-psu rect:first-child{animation:dvzb-march 1.6s linear infinite}
.dvzb.has-cpu .h-socket,.dvzb.has-psu .h-psu rect:first-child{animation:none}
@keyframes dvzb-march{to{stroke-dashoffset:-14}}
.dvzb .h-fan-blade{transform-box:fill-box;transform-origin:center;animation:dvzSpin 6s linear infinite}
.dvzb.has-psu .h-fan-blade{stroke:#4933D1;animation-duration:2.4s}
/* v1.5.14 : tant qu'une pièce n'est pas choisie, sa silhouette se monte en boucle (processeur, 2 barrettes, carte graphique),
   puis repart ; la pièce choisie remplace la silhouette et reste en place */
.dvzb:not(.has-cpu) .h-cpu{animation:dvzb-demo 7s cubic-bezier(.2,.8,.3,1) .3s infinite backwards}
.dvzb:not(.has-ram) .h-ram1{animation:dvzb-demo 7s cubic-bezier(.2,.8,.3,1) .9s infinite backwards}
.dvzb:not(.has-ram2) .h-ram2{animation:dvzb-demo 7s cubic-bezier(.2,.8,.3,1) 1.2s infinite backwards}
.dvzb:not(.has-gpu) .h-gpu{animation:dvzb-demo-gpu 7s cubic-bezier(.2,.8,.3,1) 1.7s infinite backwards}
@keyframes dvzb-demo{0%{opacity:0;transform:translateY(-22px)}9%,72%{opacity:.6;transform:none}84%,100%{opacity:0;transform:none}}
@keyframes dvzb-demo-gpu{0%{opacity:0;transform:translateX(60px)}9%,72%{opacity:.6;transform:none}84%,100%{opacity:0;transform:none}}
/* LED des silhouettes : s'allument quand la pièce est posée */
.dvzb:not(.has-cpu) .h-cpu .h-led,.dvzb:not(.has-ram) .h-ram1 .h-led,.dvzb:not(.has-ram2) .h-ram2 .h-led,.dvzb:not(.has-gpu) .h-gpu .h-led{fill:#22D3EE}
.dvzb.is-powered .h-gpu-fan{stroke-dasharray:6 4;animation:dvzb-march 1s linear infinite}
/* une seule entrée à l'ouverture */
.dvzb .hero-txt>*{animation:dvzb-up .55s cubic-bezier(.2,.8,.3,1) both}
.dvzb .hero-txt>h1{animation-delay:.06s}.dvzb .hero-txt>.hero-lead{animation-delay:.12s}.dvzb .hero-txt>.hero-chips{animation-delay:.18s}
.dvzb .hero-board{animation:dvzb-up .6s cubic-bezier(.2,.8,.3,1) .1s both}
@keyframes dvzb-up{from{opacity:0;transform:translateY(12px)}}
@media (min-width:900px){
  .dvzb .hero{grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:32px;padding:28px 28px 28px 32px}
}
@media (max-width:600px){
  .dvzb .hero{padding:16px;border-radius:20px;margin-bottom:16px;gap:14px}
  .dvzb .hero-lead{font-size:.93rem}
  .dvzb .hero-board{padding:8px 8px 6px}
}
/* ── Chargement : scène « PC en montage » (même scène que le configurateur actuel) ── */
.dvzb .intro{display:none;flex-direction:column;align-items:center;justify-content:center;min-height:380px;padding:10px 0 30px;text-align:center}
.dvzb.dvzb-loading .intro{display:flex}
.dvzb.dvzb-loading .app,.dvzb.dvzb-loading .bar{display:none}
.dvzb.dvzb-enter .app{animation:dvzb-up .55s cubic-bezier(.2,.8,.3,1) both}
.dvzb .intro.is-done{opacity:0;transform:scale(.97);transition:opacity .35s,transform .35s}
.dvzb .dvz-scene{width:min(520px,100%);height:auto;overflow:visible;animation:dvzSceneIn .6s cubic-bezier(.2,.8,.2,1) both}
.dvzb .dvz-scene *{transform-box:fill-box}
.dvzb .intro-t{margin:8px 0 2px;font-size:1.15rem;font-weight:800;color:var(--ink)}
.dvzb .intro-s{margin:0;font-size:.92rem;color:var(--muted)}
.dvzb .i-ring{fill:none;stroke-width:1.4;stroke-dasharray:2 5}
.dvzb .i-ring.a{stroke:#22D3EE}.dvzb .i-ring.b{stroke:#A78BFA}
.dvzb .i-orbit{transform-box:view-box;animation:dvzSpin 16s linear infinite}
.dvzb .i-orbit.rev{animation-direction:reverse;animation-duration:20s}
.dvzb .i-arc{fill:none;stroke:#C4B5FD;stroke-width:1.2;stroke-dasharray:4 6;opacity:.7;animation:dvzDash 7s linear infinite}
.dvzb .i-dot{transform-origin:center;animation:dvzFloat 4s ease-in-out infinite}
.dvzb .i-blob{transform-origin:center;opacity:.22;animation:dvzBreathe 4s ease-in-out infinite}
.dvzb .i-case{animation:dvzRise .6s cubic-bezier(.2,.8,.2,1) .1s both}
.dvzb .i-mb{animation:dvzPop .45s cubic-bezier(.3,1.4,.5,1) .5s both}
.dvzb .i-cpu{animation:dvzDrop .45s cubic-bezier(.3,1.4,.5,1) .75s both}
.dvzb .i-ram{animation:dvzDrop .4s cubic-bezier(.3,1.4,.5,1) .95s both}
.dvzb .i-front{animation:dvzFade .4s ease 1.1s both}
.dvzb .i-spin{transform-box:view-box;transform-origin:0 0;animation:dvzSpin 1.1s linear infinite}
.dvzb .i-rgb{animation:dvzFade .3s ease 1.2s both,dvzGlow 1.8s ease-in-out 1.5s infinite}
.dvzb .i-slot{animation:dvzSlot 3.6s ease-in-out 1.2s infinite}
.dvzb .i-gpu{transform-box:view-box;animation:dvzGpu 3.6s cubic-bezier(.6,0,.3,1) 1.2s infinite;opacity:0}
.dvzb .i-cursor{transform-box:view-box;animation:dvzCur 3.6s cubic-bezier(.6,0,.3,1) 1.2s infinite;opacity:0}
.dvzb .i-sel{animation:dvzDrop .5s cubic-bezier(.2,.8,.2,1) .4s both,dvzResize 3.6s ease-in-out 1.6s infinite;transform-origin:0 0}
.dvzb .i-chip-text{fill:#fff;font-weight:700;font-size:13px;font-family:inherit}
.dvzb .i-h{fill:#fff;stroke:#3B82F6;stroke-width:1.4}
.dvzb .i-check{animation:dvzRise .55s ease .55s both}
.dvzb .i-row{opacity:0;animation:dvzRowIn .35s ease both}
.dvzb .i-row.r1{animation-delay:1s}.dvzb .i-row.r2{animation-delay:1.35s}.dvzb .i-row.r3{animation-delay:1.7s}
@keyframes dvzSceneIn{from{opacity:0;transform:scale(.95)}}
@keyframes dvzRise{from{opacity:0;transform:translateY(16px)}}
@keyframes dvzPop{from{opacity:0;transform:scale(.6)}}
@keyframes dvzDrop{from{opacity:0;transform:translateY(-14px)}}
@keyframes dvzFade{from{opacity:0}}
@keyframes dvzRowIn{from{opacity:0;transform:translateX(-6px)}to{opacity:1;transform:none}}
@keyframes dvzSpin{to{transform:rotate(360deg)}}
@keyframes dvzDash{to{stroke-dashoffset:-100}}
@keyframes dvzFloat{50%{transform:translateY(-8px)}}
@keyframes dvzBreathe{50%{transform:scale(1.05)}}
@keyframes dvzGlow{0%,100%{opacity:.55}50%{opacity:1}}
@keyframes dvzSlot{0%,45%{opacity:1}55%,100%{opacity:0}}
@keyframes dvzResize{0%,30%{transform:scale(1)}55%,70%{transform:scale(1.05)}95%,100%{transform:scale(1)}}
@keyframes dvzGpu{0%{opacity:0;transform:translate(420px,250px)}12%{opacity:1;transform:translate(420px,250px)}50%,100%{opacity:1;transform:translate(202px,190px)}}
@keyframes dvzCur{0%{opacity:0;transform:translate(470px,268px)}12%{opacity:1;transform:translate(470px,268px)}50%{opacity:1;transform:translate(252px,208px)}62%{opacity:0;transform:translate(268px,226px)}100%{opacity:0;transform:translate(268px,226px)}}
@media (max-width:600px){.dvzb .intro{min-height:300px}}

/* ── Barre : onglets + connexion ── */
.dvzb .toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;margin:0 0 16px}
.dvzb .toolbar .tabs{margin:0;min-width:0}
.dvzb .login{display:flex;align-items:center;gap:12px;font-size:.85rem;color:var(--muted)}
.dvzb .login[hidden]{display:none}
.dvzb .login-btn{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-weight:700;text-decoration:none;white-space:nowrap}
.dvzb .login-btn:hover{border-color:var(--accent);color:var(--accent)}
.dvzb .login-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
/* mobile : bouton connexion = icône seule, les onglets gardent la place */
@media (max-width:600px){
  .dvzb .toolbar{flex-wrap:nowrap}
  .dvzb .login span{display:none}
  .dvzb .login-btn{width:44px;padding:0;justify-content:center;font-size:0;gap:0}
  .dvzb .login-btn svg{width:18px;height:18px}
}

/* ── Récap vide : on montre quoi faire, pas des boutons inutiles ── */
.dvzb .sum-empty{display:none;flex-direction:column;align-items:center;gap:8px;padding:18px 8px 6px;text-align:center}
.dvzb .sum.is-empty .sum-empty{display:flex}
.dvzb .sum.is-empty .sum-body,.dvzb .sum.is-empty .sum-save,.dvzb .sum.is-empty .sum-total small{display:none}
.dvzb .sum.is-empty .sum-total b{color:var(--muted)}
.dvzb .se-ic{position:relative;display:grid;place-items:center;width:64px;height:64px;margin-bottom:6px;border-radius:18px;background:var(--accent-l);color:var(--accent)}
.dvzb .se-ic::after{content:"";position:absolute;inset:-6px;border-radius:22px;border:2px solid rgba(73,51,209,.25);animation:dvzb-ring 2.2s ease-out infinite}
.dvzb .se-ic svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
@keyframes dvzb-ring{0%{opacity:1;transform:scale(.9)}100%{opacity:0;transform:scale(1.25)}}
.dvzb .sum-empty b{font-size:1rem}
.dvzb .sum-empty > span:not(.se-ic){max-width:30ch;font-size:.88rem;color:var(--muted)}
.dvzb .sum-empty .btn{margin-top:8px;width:100%}
/* le récap se remplit : chaque nouvelle ligne arrive doucement, la pièce choisie s'éclaire */
.dvzb .sum-body{animation:dvzb-up .35s ease both}
.dvzb .sum-lines li.is-new{animation:dvzb-line .35s cubic-bezier(.2,.8,.3,1) both}
@keyframes dvzb-line{from{opacity:0;transform:translateX(-8px)}}
.dvzb .slot.just{animation:dvzb-just 1.2s ease both}
@keyframes dvzb-just{0%{background:var(--accent-l);border-color:var(--accent)}100%{background:var(--card)}}
.dvzb .bar.is-empty .bar-l small{color:var(--accent)}

@media (prefers-reduced-motion:reduce){.dvzb .se-ic::after,.dvzb .h-pulse,.dvzb .h-socket,.dvzb .h-psu rect,.dvzb .h-fan-blade,.dvzb .h-gpu-fan,.dvzb .h-part{animation:none!important}.dvzb .h-part,.dvzb .h-led{transition:none}}
