/* Habillage « v2 » des pages historiques (Produits, Prestations, Prix, Panier, Liste, Outils…).
   Même jetons que le cadre /v2 (v2/ui.css) : clair et sobre, une couleur d'accent, texte 15 px,
   zones cliquables ≥ 36 px, mode sombre selon l'ordinateur. Actif seulement avec body.embed. */
body.embed{
  --bg:#F4F3EC; --card:#FCFBF7; --border:#E2E1D4; --text:#23281F; --sub:#6B7263; --chip:#EDECE2;
  --accent:#5A7F3F; --accent-text:#FFFFFF; --primary:#5A7F3F; --primary-hover:#4A6B32; --danger:#C4382A;
  --radius:12px; --radius-sm:8px; --line-strong:#CDCBBA; --accent-soft:#E4EDD8;
  --ok:#3E7D3A; --ok-soft:#E5F0DA; --warn:#A8650E; --warn-soft:#FBF0DA; --danger-soft:#FAE7E2;
  font:400 15px/1.5 -apple-system,BlinkMacSystemFont,"Inter","Segoe UI",system-ui,-apple-system,"Segoe UI",sans-serif; -webkit-font-smoothing:antialiased;
}
@media (prefers-color-scheme: dark){
  body.embed{
    --bg:#10140E; --card:#181D15; --border:#272E22; --text:#EEF0E6; --sub:#9AA392; --chip:#232A1E;
    --accent:#A4C97F; --accent-text:#0B1220; --primary:#A4C97F; --primary-hover:#B9DB97; --danger:#FF6B5E;
    --line-strong:#353F2E; --accent-soft:#243320; --ok:#7FD27A; --ok-soft:#1B2D17; --warn:#F0B050; --warn-soft:#2E2410; --danger-soft:#3A1A16;
    color-scheme:dark;
  }
}
body.embed .content{padding:8px 24px 32px}
body.embed .muted{color:var(--sub)} body.embed .small{font-size:13px}
body.embed :focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* cartes */
body.embed .card{border-radius:var(--radius);padding:20px;margin-bottom:16px;box-shadow:none}
body.embed .toolbar-card{padding:14px 16px}
body.embed .card h2,body.embed .card h3{font-weight:600}
body.embed .card h3{font-size:16px}

/* boutons */
body.embed .btn{min-height:38px;padding:0 16px;border-radius:var(--radius-sm);font-size:14px;font-weight:500;border:1px solid var(--line-strong);background:var(--card);color:var(--text);display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:background .15s,border-color .15s}
body.embed .btn:hover{background:var(--chip)}
body.embed .btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}
body.embed .btn.primary:hover{background:var(--primary-hover);border-color:var(--primary-hover)}
body.embed .btn.primary:disabled,body.embed .btn:disabled{opacity:.5;cursor:not-allowed}
body.embed .btn.ghost{background:transparent;border-color:var(--line-strong);color:var(--text)}
body.embed .btn.ghost:hover{background:var(--chip)}
body.embed .btn.danger{background:transparent;color:var(--danger);border-color:var(--danger)}
body.embed .btn.small{min-height:32px;padding:0 12px;font-size:13px}
body.embed .icon-btn{width:34px;height:34px;border-radius:var(--radius-sm);border:1px solid var(--line-strong);background:var(--card);color:var(--text)}
body.embed .icon-btn:hover{background:var(--chip)}

/* champs */
body.embed .input,body.embed select,body.embed .textarea,body.embed input[type=text],body.embed input[type=number],body.embed input[type=search],body.embed input[type=file]{
  font:inherit;font-size:14px;min-height:38px;border:1px solid var(--line-strong);background:var(--card);color:var(--text);border-radius:var(--radius-sm);padding:7px 12px}
body.embed .textarea{min-height:88px}
body.embed .input:focus,body.embed select:focus,body.embed .textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);outline:none}
body.embed label{font-size:13px;color:var(--sub);gap:6px}
body.embed .filters-row{gap:10px}

/* tableaux */
body.embed .table th{font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--sub);background:var(--chip);padding:11px 14px;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:1}
body.embed .table td{font-size:14px;padding:11px 14px;border-bottom:1px solid var(--border)}
body.embed .table tr:hover td{background:var(--chip)}
body.embed .table-card{border-radius:var(--radius);overflow:hidden}
body.embed .pv2-base-row td{background:var(--chip)}
body.embed #liste-table .liste-section td{background:var(--accent-soft);color:var(--accent);font-size:12.5px}

/* pastilles */
body.embed .badge{padding:2px 10px;font-size:12.5px;font-weight:500;background:var(--chip);color:var(--sub)}
body.embed .badge.ok{background:var(--ok-soft);color:var(--ok)}
body.embed .badge.warn{background:var(--warn-soft);color:var(--warn)}
body.embed .badge.bad{background:var(--danger-soft);color:var(--danger)}

/* grille produits */
body.embed .grid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px}
body.embed .product-card{border-radius:var(--radius);transition:border-color .15s,box-shadow .15s}
body.embed .product-card:hover{border-color:var(--accent);box-shadow:0 4px 14px rgba(20,30,40,.08)}
body.embed .product-thumb{background:var(--chip)}
body.embed .product-title{font-size:14px;line-height:1.35}
body.embed .product-meta{font-size:12.5px}
body.embed .cart-item{background:var(--chip);font-size:13.5px;padding:9px 12px}
body.embed .cart-suggestion{border-color:var(--line-strong);font-size:13px}

/* fenêtres, toast */
body.embed .modal-backdrop{background:rgba(15,20,25,.45)}
body.embed .modal{border-radius:14px;padding:24px;box-shadow:0 20px 50px rgba(0,0,0,.25)}
body.embed .modal h2{font-size:19px;margin:0 0 12px}
body.embed .modal-actions{gap:10px;margin-top:16px}
body.embed .toast{border-radius:var(--radius-sm);background:var(--text);color:var(--card);font-size:14px}

/* cartes cliquables (Accès rapide), puces */
body.embed .raccourci-card{border-radius:var(--radius)}
body.embed .raccourci-card:hover{border-color:var(--accent)}
body.embed .racine-chip{background:var(--chip);border-radius:99px}

/* barre du haut : sélecteur de destination seul, aligné à droite */
body.embed .topbar{padding:12px 24px 4px}
body.embed .target-picker select{min-width:280px}

/* mode démo, verrou : gardent leur couleur d'alerte */
body.embed .demo-banner{background:var(--warn-soft);color:var(--warn);border-bottom:1px solid var(--warn)}

/* étapes numérotées dans les titres de carte */
body.embed h3 .n{display:inline-grid;place-items:center;width:24px;height:24px;margin-right:10px;border-radius:50%;background:var(--accent);color:var(--accent-text);font:600 13px/1 -apple-system,BlinkMacSystemFont,"Inter","Segoe UI",sans-serif;vertical-align:1px}
body.embed .steph{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin:2px 0 10px}
body.embed .steph h3{margin:0}

/* Ctrl+Z : fenêtre de confirmation */
#undo-modal .undo-what{padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--chip)}
#undo-modal .undo-warn{margin-top:14px;padding:10px 12px;border-radius:var(--radius-sm);background:var(--warn-soft,#FCEFD9);color:var(--warn,#94500A);font-size:13.5px;line-height:1.45}
