/* =========================================================
   Création Audio V2 — Portail dealer (privé)
   Réutilise site.css (barre/marque) + boutique.css (catalogue, fiche
   spacer, panier). Ce fichier ajoute : connexion, écran d'accès refusé,
   onglets Catalogue / Mes commandes, suivi des commandes, note +
   bandeau « modification » du panier, fond réglable, panneau
   « Ma commande » collé à droite, barre du bas, barre de rabais par modèle.
   ========================================================= */

/* Barre : bouton déconnexion + badge */
.dl-badge { font-size:.62rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--on-ember);
  background:var(--ember); border-radius:100px; padding:3px 9px; margin-left:2px; }
.dl-logout { font:inherit; font-weight:600; font-size:.85rem; cursor:pointer; color:var(--ink);
  background:transparent; border:1.5px solid var(--line); border-radius:100px; padding:7px 14px; }
.dl-logout:hover { border-color:var(--ember); color:var(--ember-dim); }
.dealer-page .home-top .cart-btn { margin-right:4px; }

/* Connexion + accès refusé */
.dl-center { min-height:70vh; display:flex; align-items:center; justify-content:center; padding:24px; }
.dl-card { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-lg);
  padding:30px; width:100%; max-width:380px; box-shadow:var(--shadow); }
.dl-card h1 { font-size:1.3rem; margin-bottom:6px; }
.dl-card p { color:var(--muted); font-size:.92rem; margin:0 0 18px; line-height:1.5; }
.dl-card .field { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.dl-card label { font-size:.72rem; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); }
.dl-card input { font:inherit; color:var(--ink); background:var(--paper); border:1.5px solid var(--line);
  border-radius:var(--radius-sm); padding:10px 12px; width:100%; }
.dl-card input:focus { outline:none; border-color:var(--ember); }
.dl-submit { width:100%; justify-content:center; cursor:pointer; font:inherit; font-weight:700; color:var(--on-ember);
  background:var(--ember); border:1.5px solid var(--ember); border-radius:100px; padding:12px; }
.dl-submit:hover { background:var(--ember-dim); border-color:var(--ember-dim); }
.dl-submit:disabled { opacity:.55; cursor:not-allowed; }
.dl-status { color:var(--muted); font-size:.85rem; margin-top:12px; min-height:1.2em; }
.dl-gate-actions { margin-top:18px; }
/* connexion par code : lien vers revendeur, Renvoyer / Changer de courriel */
.dl-card a:not(.dl-submit) { color:var(--ember-dim); font-weight:600; }
.dl-card p b { color:var(--ink); word-break:break-all; }
.dl-join { margin:14px 0 0 !important; font-size:.88rem !important; }
.dl-code-links { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 16px; margin-top:6px; }
.dl-linkbtn { font:inherit; font-size:.86rem; font-weight:600; color:var(--ember-dim); background:none; border:0; padding:4px 0; cursor:pointer; }
.dl-linkbtn:hover:not(:disabled) { text-decoration:underline; text-underline-offset:3px; }
.dl-linkbtn:disabled { color:var(--muted); cursor:default; }
#dl-code-in { font-size:1.4rem; letter-spacing:.3em; text-align:center; font-variant-numeric:tabular-nums; }

/* Bandeau connecté + onglets Catalogue / Mes commandes */
.dl-top { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px 20px;
  padding:clamp(18px, 2.4vw, 26px) 0 0; }
.dl-hello { display:flex; align-items:center; gap:4px 8px; flex-wrap:wrap; flex:1 1 380px; min-width:0; font-size:.9rem; color:var(--ink-2); }
.dl-hello b { color:var(--ink); font-weight:600; }
.dl-badge.is-admin { color:#fff; background:var(--fill-strong); }
.dl-admin-note { flex-basis:100%; font-size:.82rem; color:var(--muted); }
.dl-tabs { display:flex; gap:6px; padding:4px; background:var(--wash); border:1px solid var(--line); border-radius:100px; }
.dl-tab { display:inline-flex; align-items:center; gap:8px; height:38px; padding:0 16px; font-weight:600; font-size:.92rem;
  color:var(--ink-2); text-decoration:none; white-space:nowrap; border-radius:100px; transition:color .15s, background .15s; }
.dl-tab:hover { color:var(--ink); background:var(--paper); }
.dl-tab[aria-current="page"] { color:#fff; background:var(--fill-strong); }
.dl-tab:focus-visible { outline:3px solid var(--ember-dim); outline-offset:2px; }
.dl-tab-n { min-width:20px; height:20px; padding:0 6px; display:inline-flex; align-items:center; justify-content:center;
  font-size:.72rem; font-weight:700; color:var(--on-ember); background:var(--ember); border-radius:100px; }
.dl-tab-n[hidden] { display:none; }

/* Panier : bandeau « modification », note, message d'erreur */
.cart-edit { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 20px;
  font-size:.86rem; color:var(--ember-ink); background:var(--tint); border-bottom:1px solid var(--tint-line); }
.cart-edit[hidden] { display:none; }
.cart-edit button { flex:none; padding:5px 10px; font:inherit; font-weight:700; font-size:.82rem; color:var(--ink); cursor:pointer;
  background:var(--paper); border:1px solid var(--line-2); border-radius:8px; }
.cart-edit button:hover { border-color:var(--ink); }
/* Panier : cueillette ou livraison, barre de la livraison gratuite */
.cart-ship { display:flex; flex-direction:column; gap:8px; }
.cart-ship[hidden], .ship-addr[hidden], .ship-bar[hidden], .cart-line-sub[hidden] { display:none; }
.ship-seg { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.ship-seg button { min-height:40px; padding:6px 8px; font:inherit; font-size:.84rem; font-weight:600; line-height:1.2; color:var(--ink-2); cursor:pointer;
  background:var(--paper); border:1px solid var(--line-2); border-radius:10px; }
.ship-seg button:hover { border-color:var(--ink); }
.ship-seg button.is-on { font-weight:700; color:var(--ember-ink); background:var(--tint); border-color:var(--ember); }
.ship-seg button:focus-visible { outline:3px solid var(--ember-dim); outline-offset:2px; }
.ship-addr { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.ship-f { display:block; min-width:0; }
.ship-f-w { grid-column:1 / -1; }
.ship-f > span { display:block; margin:0 0 3px; font-size:.8rem; font-weight:700; color:var(--ink-2); }
.ship-f input { width:100%; min-width:0; padding:8px 11px; font:inherit; font-size:.9rem; color:var(--ink); background:var(--paper); border:1px solid var(--line-2); border-radius:10px; }
.ship-f input:focus { outline:none; border-color:var(--ink); box-shadow:0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
#sa-postal { text-transform:uppercase; }
/* menu maison (ca-pick.js) */
.cpk { position:relative; min-width:0; }
.cpk-btn { display:flex; align-items:center; width:100%; min-width:0; padding:8px 28px 8px 11px; font:inherit; font-size:.9rem; color:var(--ink); text-align:left; cursor:pointer;
  background:var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C727C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 8px center / 15px no-repeat;
  border:1px solid var(--line-2); border-radius:10px; }
.cpk-btn:hover, .cpk-btn[aria-expanded="true"], .cpk-btn:focus-visible { outline:none; border-color:var(--ink); }
.cpk-txt { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cpk-txt.is-ph { color:var(--muted); }
.cpk-pop { position:fixed; z-index:200; display:flex; flex-direction:column; padding:6px; background:var(--paper); border:1px solid var(--line-2); border-radius:12px; box-shadow:0 22px 44px -22px rgba(20,22,26,.5); }
.cpk-list { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; }
.cpk-item { display:flex; width:100%; padding:9px 10px; font:inherit; font-size:.9rem; color:var(--ink); text-align:left; cursor:pointer; background:none; border:0; border-radius:9px; }
.cpk-item:hover, .cpk-item.is-active { background:var(--wash); }
.cpk-item.is-sel { font-weight:700; color:var(--ember-ink); }
.cpk-item.is-ph { color:var(--muted); }
/* livraison choisie : tout le panneau défile, sinon les champs écrasent la liste */
.dealer-page .cart-panel.is-ship { overflow-y:auto; overscroll-behavior:contain; }
.dealer-page .cart-panel.is-ship .cart-items, .dealer-page .cart-panel.is-ship .cart-foot { flex:none; overflow:visible; }
/* iPhone : sous 16 px, le champ zoome la page au toucher */
@media (max-width:767px) { .ship-f input, .cpk-btn { font-size:16px; } }
.ship-bar-txt { margin:0 0 5px; font-size:.84rem; font-weight:700; color:var(--ink-2); }
.ship-bar.is-got .ship-bar-txt { color:var(--good-ink); }
.ship-track { height:6px; overflow:hidden; background:var(--wash-2); border-radius:100px; }
.ship-fill { display:block; width:0; height:100%; background:var(--ember); border-radius:inherit; transition:width .35s ease; }
.ship-bar.is-got .ship-fill { background:var(--good-ink); }
.ship-terms { margin:5px 0 0; font-size:.74rem; line-height:1.35; color:var(--muted); }
.ship-pay { grid-column:1 / -1; margin:2px 0 0; }
.dl-disc { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; margin:0 0 16px; padding:12px 16px; border-radius:14px;
  background:color-mix(in srgb, var(--ember) 12%, var(--paper)); border:1px solid color-mix(in srgb, var(--ember) 35%, var(--line)); color:var(--ink); font-size:.95rem; line-height:1.4; }
.dl-disc b { color:var(--ember-ink); }
.cart-disc { margin:0 0 10px; padding:8px 12px; border-radius:10px; background:color-mix(in srgb, var(--ember) 12%, var(--paper)); color:var(--ink); font-size:.84rem; line-height:1.35; }
.cart-disc b { color:var(--ember-ink); margin-right:4px; }
.cart-line-sub { font-size:.88rem; color:var(--ink-2); font-variant-numeric:tabular-nums; }
/* téléphone / tablette : tout le panneau défile, sinon le bas du panier écrase la liste */
@media (max-width:1199px) {
  .dealer-page .cart-panel { overflow-y:auto; overscroll-behavior:contain; }
  .dealer-page .cart-items { flex:none; overflow:visible; }
  .dealer-page .cart-foot { flex:none; }
}
.cart-line-total small { font-family:var(--font); font-size:.78rem; font-weight:500; color:var(--muted); }
.cart-note-lbl { font-size:.8rem; font-weight:700; color:var(--ink-2); }
.cart-note-lbl span { font-weight:500; color:var(--muted); }
#cart-note { width:100%; min-height:58px; margin-top:-4px; padding:9px 12px; font:inherit; font-size:.9rem; line-height:1.4; color:var(--ink);
  resize:vertical; background:var(--paper); border:1px solid var(--line-2); border-radius:12px; }
#cart-note:focus { outline:none; border-color:var(--ink); box-shadow:0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
.cart-msg.is-bad { color:var(--bad); }
.citem-sum { display:flex; flex-direction:column; align-items:flex-end; gap:2px; }
.citem-sum .citem-unit { padding:0 4px; margin-right:-4px; font-size:.78rem; color:var(--muted); white-space:nowrap; }

/* Mes commandes */
.dl-flash { max-width:860px; margin:0 0 16px; padding:13px 16px; font-weight:600; color:var(--good-ink); background:var(--good-wash);
  border:1px solid color-mix(in srgb, var(--good) 30%, var(--paper)); border-radius:14px; }
#dl-orders-list { max-width:860px; }
.dl-help { max-width:860px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 18px;
  margin:0 0 28px; padding:12px 12px 12px 20px; background:var(--paper); border:1px solid var(--line); border-radius:16px; }
.dl-help b { font-size:.95rem; color:var(--ink); }
.dl-help-btns { display:flex; gap:8px; }
.dl-help .dl-btn { display:inline-flex; align-items:center; text-decoration:none; }
.dl-sec { display:flex; align-items:center; gap:8px; margin:0 0 12px; font-family:var(--font); font-size:.78rem; font-weight:800;
  letter-spacing:.09em; text-transform:uppercase; color:var(--dl-fg-2, var(--muted)); }
.dl-sec span { min-width:22px; height:22px; padding:0 7px; display:inline-flex; align-items:center; justify-content:center; border-radius:100px;
  font-size:.75rem; letter-spacing:0; color:var(--on-ember); background:var(--ember); }
.dl-orders-grp { display:grid; gap:14px; margin-bottom:32px; }
.dl-orders-grp.is-past { gap:8px; }
.dl-order { padding:18px 20px; background:var(--paper); border:1px solid var(--line); border-radius:18px; transition:box-shadow .3s, border-color .3s; }
article.dl-order { box-shadow:0 10px 30px -18px rgba(0,0,0,.35); }
.dl-order-total { display:flex; flex-direction:column; align-items:flex-end; gap:2px; text-align:right; }
.dl-order-total small { font-size:.8rem; color:var(--muted); white-space:nowrap; }

/* suivi en étapes */
.dl-steps { display:grid; grid-template-columns:repeat(4, 1fr); margin:18px 0 6px; padding:0; list-style:none; }
.dl-steps li { position:relative; padding-top:22px; font-size:.8rem; font-weight:600; color:var(--muted); text-align:center; }
.dl-steps li::before { content:''; position:absolute; z-index:1; top:0; left:50%; width:14px; height:14px; margin-left:-7px; box-sizing:border-box;
  border-radius:50%; background:var(--paper); border:2px solid var(--line-2); }
.dl-steps li + li::after { content:''; position:absolute; top:6px; right:50%; width:100%; height:2px; background:var(--line-2); }
.dl-steps li.is-done { color:var(--ink-2); }
.dl-steps li.is-done::before { background:var(--ink); border-color:var(--ink); }
.dl-steps li.is-done::after, .dl-steps li.is-on::after { background:var(--ink); }
.dl-steps li.is-on { color:var(--ink); font-weight:800; }
.dl-steps li.is-on::before { background:var(--ember); border-color:var(--ember); box-shadow:0 0 0 5px color-mix(in srgb, var(--ember) 22%, transparent); }

/* historique : ligne compacte dépliable */
details.dl-order { padding:0; }
details.dl-order > summary { display:grid; grid-template-columns:minmax(0, 1fr) auto auto 18px; align-items:center; gap:14px;
  padding:12px 18px; cursor:pointer; list-style:none; border-radius:18px; }
details.dl-order > summary::-webkit-details-marker { display:none; }
details.dl-order > summary:hover { background:var(--wash); }
details.dl-order > summary:focus-visible { outline:3px solid var(--ember-dim); outline-offset:2px; }
details.dl-order .dl-order-id { flex-direction:row; align-items:baseline; gap:12px; }
details.dl-order .dl-order-id b { font-size:1.05rem; }
.dl-order-sum { min-width:84px; text-align:right; font-weight:700; font-variant-numeric:tabular-nums; }
.dl-chev { width:9px; height:9px; justify-self:center; border-right:2px solid var(--muted); border-bottom:2px solid var(--muted);
  transform:translateY(-2px) rotate(45deg); transition:transform .2s; }
details[open] .dl-chev { transform:translateY(2px) rotate(-135deg); }
.dl-order-body { padding:0 18px 16px; }
.dl-order-body .dl-order-lines { margin-top:0; }
.dl-order-meta { margin:10px 0 0; font-size:.84rem; color:var(--muted); }

/* aucune commande */
.dl-empty { max-width:860px; display:flex; flex-direction:column; align-items:center; gap:6px; padding:44px 24px; text-align:center;
  background:var(--paper); border:1px solid var(--line); border-radius:20px; }
.dl-empty-ic { width:60px; height:60px; margin-bottom:6px; display:flex; align-items:center; justify-content:center; border-radius:18px;
  color:var(--ember-ink); background:color-mix(in srgb, var(--ember) 12%, var(--paper)); }
.dl-empty-ic svg { width:30px; height:30px; }
.dl-empty h2 { margin:0; font-family:var(--display); font-size:1.35rem; color:var(--ink); }
.dl-empty p { margin:0 0 12px; color:var(--muted); }
.dl-btn.is-primary { display:inline-flex; align-items:center; height:44px; padding:0 20px; color:#fff; background:var(--fill-strong); border-color:var(--fill-strong);
  text-decoration:none; }
.dl-btn.is-primary:hover { background:var(--fill-strong-hover); }
.dl-order.is-flash { border-color:var(--ember); box-shadow:0 0 0 3px color-mix(in srgb, var(--ember) 16%, transparent); }
.dl-order.is-cancelled { opacity:.7; }
.dl-order-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.dl-order-id { display:flex; flex-direction:column; gap:2px; min-width:0; }
.dl-order-id b { font-family:var(--display); font-size:1.25rem; letter-spacing:-.01em; }
.dl-order-id span { font-size:.84rem; color:var(--muted); }
.dl-status { flex:none; display:inline-flex; align-items:center; gap:6px; padding:5px 11px; border-radius:100px;
  font-size:.78rem; font-weight:700; white-space:nowrap; color:var(--ink-2); background:var(--wash-2); }
.dl-status::before { content:''; width:7px; height:7px; border-radius:50%; background:currentColor; }
/* les messages des cartes de connexion gardent leur style de texte simple (pas de pastille de statut) */
.dl-card .dl-status { display:block; padding:0; border-radius:0; background:none; white-space:normal; font-size:.85rem; font-weight:400; color:var(--muted); }
.dl-card .dl-status::before { content:none; }
.dl-card .dl-status.is-bad { color:var(--bad-ink); }
.dl-status.is-new { color:var(--warn-ink); background:var(--tint); }
.dl-status.is-preparing { color:var(--info-ink); background:var(--info-wash); }
.dl-status.is-ready { color:var(--good-ink); background:var(--good-wash); }
.dl-status.is-paid { color:var(--good-ink); background:var(--good-wash); }
.dl-order-unpaid { display:inline-flex; align-items:center; height:38px; font-size:.85rem; color:var(--muted); font-weight:600; }
.dl-status.is-invoiced { color:var(--ink-2); background:var(--wash-2); }
.dl-status.is-cancelled { color:var(--bad-ink); background:var(--bad-wash); }
.dl-order-lines { display:grid; margin-top:12px; border-top:1px solid var(--line); }
.dl-ol { display:grid; grid-template-columns:52px minmax(0, 1fr) auto auto auto; align-items:center; gap:6px 16px;
  padding:8px 0; font-size:.92rem; border-bottom:1px solid var(--line); font-variant-numeric:tabular-nums; }
.dl-ol-img { width:52px; height:52px; display:flex; align-items:center; justify-content:center; background:var(--wash); border-radius:10px; overflow:hidden; }
.dl-ol-img img { width:100%; height:100%; object-fit:contain; }
.dl-ol-n { font-weight:700; color:var(--ink); text-decoration:none; overflow-wrap:anywhere; }
a.dl-ol-n:hover { color:var(--ember-ink); text-decoration:underline; text-underline-offset:3px; }
.dl-ol-q { color:var(--ink-2); }
.dl-ol-u { min-width:74px; text-align:right; color:var(--muted); }
.dl-ol-t { min-width:84px; text-align:right; font-weight:700; }
.dl-order-note { margin:10px 0 0; padding:9px 12px; font-size:.88rem; color:var(--ink-2); background:var(--wash); border-radius:10px; }
.dl-order-foot { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 16px; margin-top:12px; }
.dl-order-total { font-variant-numeric:tabular-nums; }
.dl-order-total b { font-family:var(--display); font-size:1.25rem; color:var(--ink); }
.dl-order-actions { display:flex; align-items:center; gap:8px; }
.dl-btn { height:38px; padding:0 14px; font:inherit; font-weight:700; font-size:.88rem; color:var(--ink); cursor:pointer;
  background:var(--paper); border:1px solid var(--line-2); border-radius:10px; transition:border-color .15s, color .15s, background .15s; }
.dl-btn:hover { border-color:var(--ink); }
.dl-btn.is-danger:hover { color:var(--bad); border-color:var(--bad); background:var(--bad-wash); }
.dl-btn:disabled { opacity:.5; cursor:wait; }
.dl-btn:focus-visible { outline:3px solid var(--ember-dim); outline-offset:2px; }

@media (max-width:560px) {
  /* en-tête : logo + panier + déconnexion doivent tenir sur un téléphone */
  .dealer-page .home-top .brand-tx { display:none; }
  .dealer-page .home-top .dl-logout { padding:7px 12px; font-size:.8rem; }
  .dl-top { flex-direction:column; align-items:stretch; }
  .dl-tab { flex:1 1 auto; min-width:0; justify-content:center; padding:0 10px; gap:6px; font-size:.86rem; }
  .dl-ol { grid-template-columns:52px minmax(0, 1fr) auto auto; }
  .dl-ol-u { display:none; }
  .dl-order-actions { width:100%; }
  .dl-order-actions .dl-btn { flex:1; }
  .dl-order { padding:16px; }
  .dl-help { padding:14px; }
  .dl-help-btns { width:100%; }
  .dl-help-btns .dl-btn { flex:1; justify-content:center; }
  .dl-steps li { font-size:.72rem; }
  details.dl-order { padding:0; }
  details.dl-order > summary { gap:10px; padding:12px 14px; }
  details.dl-order .dl-order-id { flex-direction:column; gap:0; }
  .dl-order-sum { min-width:0; }
  .dl-order-body { padding:0 14px 14px; }
}
.dl-order-foot .dl-order-total { align-items:flex-start; text-align:left; }

/* Messages des écrans de connexion (p.dl-status) : pas le style « pastille » des statuts de commande */
p.dl-status { display:block; padding:0; border-radius:0; background:none; white-space:normal;
  font-size:.85rem; font-weight:400; color:var(--muted); }
p.dl-status::before { content:none; }
/* code de vérification (2FA) */
#dl-mfa-code { font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:1.3rem;
  letter-spacing:.35em; text-align:center; font-variant-numeric:tabular-nums; }

/* =========================================================
   Fond du portail : celui du site (clair, ou sombre si le dealer l'a choisi
   dans l'onglet Apparence : assets/look.js). Les --dl-* restent pour les règles ci-dessous.
   ========================================================= */
:root { --dl-bg:var(--wash); --dl-fg:var(--ink); --dl-fg-2:var(--ink-2); --dl-fg-3:var(--muted);
  --dl-veil:color-mix(in srgb, var(--ink) 5%, transparent); --dl-veil-2:color-mix(in srgb, var(--ink) 10%, transparent); --dl-tabon-fg:#fff; --dl-tabon-bg:var(--fill-strong); }
body.dealer-page { background:var(--dl-bg); }
.dealer-page .dl-top, .dealer-page .dl-hello, .dealer-page .shop-head, .dealer-page .spc-count, .dealer-page .spc-legal,
.dealer-page #dl-list > p, .dealer-page #dl-orders-list > p { color:var(--dl-fg-2); }
.dealer-page .dl-top b, .dealer-page .shop-head h1, .dealer-page .shop-head b { color:var(--dl-fg); }
.dealer-page .shop-head .muted, .dealer-page .dl-admin-note, .dealer-page .spc-count,
.dealer-page .spc-legal .sp-legal, .dealer-page .shop-head .ask-alt, .dealer-page .shop-head .ask-alt a { color:var(--dl-fg-3); }
.dealer-page .shop-head .shop-eyebrow { color:color-mix(in srgb, var(--ember) 70%, var(--dl-fg)); }
.dealer-page .shop-head a.ask { color:var(--dl-fg); background:color-mix(in srgb, var(--ember) 28%, transparent);
  text-decoration-color:color-mix(in srgb, var(--ember) 80%, var(--dl-fg)); }
.dealer-page .dl-tabs { background:var(--dl-veil); border-color:var(--dl-veil-2); }
.dealer-page .dl-tab { color:var(--dl-fg-2); }
.dealer-page .dl-tab:hover { color:var(--dl-fg); background:var(--dl-veil-2); }
.dealer-page .dl-tab[aria-current="page"] { color:var(--dl-tabon-fg); background:var(--dl-tabon-bg); }
/* fiche spacer : tout son contenu est posé sur le fond -> une grande carte blanche */
.dealer-page #dl-product { margin-top:18px; padding:clamp(18px, 2.6vw, 32px); background:var(--paper);
  border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow); }

/* =========================================================
   « Ma commande » collée à droite (≥ 1200 px) ; tiroir + barre du bas en dessous
   ========================================================= */
@media (min-width:1200px) {
  .dealer-page.dl-in { --maxw:1560px; }
  .dl-in .dl-layout { display:grid; grid-template-columns:minmax(0, 1fr) 370px; align-items:start; gap:28px;
    max-width:var(--maxw); margin:0 auto; padding:0 var(--gutter); }
  .dl-in .dl-layout > .shop { max-width:none; margin:0; padding-left:0; padding-right:0; min-width:0; }
  .dl-in .cart-panel { position:sticky; top:calc(var(--top-h) + 18px); right:auto; bottom:auto; z-index:5; width:auto; max-width:none;
    height:auto; max-height:calc(100vh - var(--top-h) - 36px); margin-top:clamp(18px, 2.4vw, 26px);
    transform:none; visibility:visible; transition:none; overflow:hidden;
    border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow); }
  .dl-in .cart-close, .dl-in .home-top .cart-btn, .dl-in .cart-backdrop { display:none; }
  .dl-in .cart-phead { padding:14px 18px; }
  /* la liste grandit avec la commande ; elle ne défile que quand le panneau atteint le bas de l'écran */
  .dl-in .cart-items { flex:0 1 auto; min-height:0; padding:14px 16px; }
  .dl-in .cart-foot { padding:14px 18px 16px; }
  .dl-in .cart-foot .cart-note { display:none; }   /* déjà dit dans le bandeau du haut : plus de place pour les lignes */
}
.cart-phead.pulse { animation:dlPing .7s ease-out; }

/* Barre « Mon véhicule » + recherche : carte arrondie dans la colonne (plus de débord sous le panneau) */
.dealer-page .spc-bar { top:calc(var(--top-h) + 10px); margin:0 0 12px; padding:14px 18px;
  border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); }
@keyframes dlPing { 0% { background:transparent; } 35% { background:color-mix(in srgb, var(--ember) 14%, var(--paper)); } 100% { background:transparent; } }

/* Barre du bas (téléphone / tablette) */
.dl-mbar { position:fixed; left:50%; bottom:calc(14px + env(safe-area-inset-bottom, 0px)); translate:-50% 0; z-index:35;
  width:min(560px, calc(100vw - 2 * var(--gutter))); display:flex; align-items:center; gap:12px; padding:8px 8px 8px 18px;
  font:inherit; text-align:left; color:#fff; cursor:pointer; background:var(--fill-strong); border:1px solid rgba(255,255,255,.16); border-radius:100px;
  box-shadow:0 18px 40px -16px rgba(0,0,0,.55); }
.dl-mbar-n { flex:none; font-weight:700; font-size:.92rem; }
.dl-mbar-hint { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.82rem;
  color:rgba(255,255,255,.72); font-variant-numeric:tabular-nums; }
.dl-mbar-total { flex:none; padding:8px 14px; font-weight:800; font-variant-numeric:tabular-nums; color:var(--ink);
  background:var(--ember); border-radius:100px; }
.dl-mbar:focus-visible { outline:3px solid var(--ember-dim); outline-offset:3px; }
.dl-mbar.pulse { animation:cartPulse .45s ease; }
@media (min-width:1200px) { .dl-mbar { display:none !important; } }
@media (max-width:1199px) {
  .dl-mbar-on .toast { bottom:86px; }
  .dl-mbar-on .shop { padding-bottom:calc(clamp(64px, 8vw, 110px) + 70px); }
}

/* =========================================================
   Paliers par modèle (ligne du panier) : colonnes cliquables,
   meilleur prix plein, palier atteint avec un contour
   ========================================================= */
.dealer-page .citem { flex-wrap:wrap; }
.citem-tiers { --tb-ink:color-mix(in srgb, var(--ember) 65%, var(--ink)); flex-basis:100%; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0, 1fr);
  padding:10px 0 0; border-top:1px dashed var(--line); }
.tb-tier { display:flex; flex-direction:column; align-items:center; gap:4px; min-width:0; padding:4px 0; font:inherit; text-align:center;
  font-variant-numeric:tabular-nums; color:var(--ink); cursor:pointer; background:none; border:0; border-radius:10px; }
.tb-tier:focus-visible { outline:3px solid var(--ember-dim); outline-offset:-1px; }
.tb-q { font-size:.8rem; font-weight:700; line-height:1.25; }
.tb-pw { display:flex; align-items:center; width:100%; }
.tb-pw::before, .tb-pw::after { content:''; flex:1 1 0; min-width:0; height:1px; background:var(--line-2); }
.tb-tier:first-child .tb-pw::before, .tb-tier:last-child .tb-pw::after { visibility:hidden; }
.tb-p { flex:none; padding:5px 9px; font-size:.86rem; font-weight:800; line-height:1.2; white-space:nowrap; color:var(--tb-ink);
  background:color-mix(in srgb, var(--ember) 12%, var(--paper)); border-radius:7px; transition:background .15s, color .15s, box-shadow .15s; }
.tb-r { font-size:.74rem; line-height:1.25; color:var(--muted); }
@media (hover:hover) {
  .tb-tier:hover .tb-p { background:color-mix(in srgb, var(--ember) 24%, var(--paper)); }
}
/* Tous les paliers ont le même look ; celui où on se trouve a un contour qui pulse doucement (« vous êtes ici »). */
.tb-tier.is-reached .tb-p { box-shadow:inset 0 0 0 2px var(--ember); animation:dlTierHere 2.4s ease-in-out infinite; }
.tb-tier.is-reached .tb-r { font-weight:700; color:var(--tb-ink); }
@keyframes dlTierHere {
  0%, 100% { box-shadow:inset 0 0 0 2px var(--ember), 0 0 0 0 color-mix(in srgb, var(--ember) 45%, transparent); }
  50%      { box-shadow:inset 0 0 0 2px color-mix(in srgb, var(--ember) 55%, transparent), 0 0 0 5px color-mix(in srgb, var(--ember) 0%, transparent); }
}
.tb-p.is-pop { animation:dlLblPop .8s ease-out; }
.tb-tier.is-reached .tb-p.is-pop { animation:dlLblPop .8s ease-out, dlTierHere 2.4s ease-in-out infinite; }
@keyframes dlLblPop { 0% { transform:scale(1); } 35% { transform:scale(1.14); } 100% { transform:scale(1); } }
.citem-unit.is-pop { display:inline-block; border-radius:6px; animation:dlPricePop 1s ease-out; }
@keyframes dlPricePop {
  0%   { background:color-mix(in srgb, var(--ember) 28%, transparent); transform:scale(1.06); }
  100% { background:transparent; transform:scale(1); }
}

@media (prefers-reduced-motion:reduce) {
  .tb-p.is-pop, .tb-tier.is-reached .tb-p, .tb-tier.is-reached .tb-p.is-pop, .citem-unit.is-pop, .cart-phead.pulse, .dl-mbar.pulse { animation:none; }
  .tb-p, .ship-fill { transition:none; }
}

/* =========================================================
   Crédit boutique (#/credit + case du panier) — dealer.js, RPC dealer_credit_me
   ========================================================= */
.cart-credit { display:flex; align-items:center; gap:10px; margin:2px 0; padding:10px 12px; border-radius:12px; cursor:pointer;
  background:var(--good-wash); border:1px solid color-mix(in srgb, var(--good) 30%, var(--paper)); font-size:.9rem; font-weight:600; color:var(--ink); }
.cart-credit[hidden] { display:none; }
.cart-credit input { width:18px; height:18px; flex:none; margin:0; accent-color:var(--good-ink); }
.cart-credit span { flex:1; min-width:0; }
.cart-credit b { color:var(--good-ink); font-variant-numeric:tabular-nums; white-space:nowrap; }
#cart-credit-amt { color:var(--good-ink); }
.dl-credit-card { max-width:860px; display:grid; gap:4px; margin:0 0 22px; padding:18px 20px; border-radius:16px;
  background:var(--good-wash); border:1px solid color-mix(in srgb, var(--good) 30%, var(--paper)); }
.dl-credit-card span { font-size:.78rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--good-ink); }
.dl-credit-card b { font-family:var(--display); font-size:2.2rem; line-height:1.1; color:var(--ink); font-variant-numeric:tabular-nums; }
.dl-credit-card p { margin:6px 0 0; font-size:.88rem; color:var(--ink-2); line-height:1.45; }
.dl-credit-h { margin:0 0 8px; font-size:1.05rem; }
#dl-credit-list { max-width:860px; border-top:1px solid var(--line); }
.dl-credit-row { display:grid; grid-template-columns:120px minmax(0,1fr) auto 110px; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); font-size:.92rem; }
.dcr-date { color:var(--muted); white-space:nowrap; }
.dcr-what { min-width:0; }
.dcr-what b { font-weight:600; }
.dcr-what small { display:block; color:var(--muted); font-size:.84rem; overflow-wrap:anywhere; }
.dcr-amt { text-align:right; font-weight:700; white-space:nowrap; font-variant-numeric:tabular-nums; }
.dcr-amt.is-plus { color:var(--good-ink); }
@media (max-width:640px) {
  .dl-credit-row { grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; }
  .dcr-date { grid-column:1 / -1; font-size:.82rem; }
  .dl-credit-row > span:empty { display:none; }
  .dcr-print { grid-column:1; grid-row:3; justify-self:start; }
  .dcr-amt { grid-column:2; grid-row:2; }
}
