/* Boutique I-MANAGEMENT Fournitures : complète site.css (mêmes couleurs, typographie et composants). */

/* En-tête : logo, recherche, panier, puis la barre des catégories */
.shop-header .header-in { gap: 22px; }
.shop-logo { gap: 10px; }
.shop-badge { padding: 4px 10px; border-radius: var(--pill); background: var(--accent); color: var(--on-accent); font-size: 12.5px; font-weight: 700; }
.shop-search { flex: 1; display: flex; align-items: center; max-width: 560px; margin-inline: auto; padding: 4px 4px 4px 18px;
  border: 1px solid var(--line-2); border-radius: var(--pill); background: var(--surface); }
.shop-search:focus-within { border-color: var(--text); box-shadow: 0 0 0 4px var(--soft-2); }
.shop-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; padding: 8px 0; }
.shop-search button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--text); color: #fff; cursor: pointer; }
.shop-search button svg { width: 17px; height: 17px; }
.shop-search.big { max-width: 620px; margin: 28px 0 0; padding: 6px 6px 6px 22px; }
.shop-search.big .btn { width: auto; height: auto; padding: 12px 20px; border-radius: var(--pill); color: var(--on-accent); background: var(--accent); }
.shop-search.big .btn svg { width: 16px; height: 16px; }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--pill);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; flex: none; }
.cart-link svg { width: 19px; height: 19px; }
.cart-link:hover { border-color: var(--text); }
.cart-count { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--pill);
  background: var(--accent); color: var(--on-accent); font-size: 12.5px; }

.shop-hero { padding: clamp(40px, 6vw, 80px) 0; background: var(--soft); border-bottom: 1px solid var(--line); }
.shop-hero-in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.shop-hero h1 { font-size: clamp(30px, 4.2vw, 48px); margin: 0 0 16px; }
.shop-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.shop-steps li { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.shop-steps .step-n { margin: 0; flex: none; width: 40px; height: 40px; border: 1px solid var(--line-2); font-weight: 700; }
.shop-steps p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cat-card { display: grid; gap: 8px; align-content: start; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--text); transition: box-shadow .2s, border-color .2s; }
.cat-card:hover { box-shadow: var(--shadow-hover); border-color: var(--line-2); }
.cat-card > span:not(.cat-icon):not(.more) { color: var(--muted); font-size: 14.5px; }
.cat-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--soft); overflow: hidden; }
.cat-icon svg { width: 24px; height: 24px; }
.cat-icon img { width: 100%; height: 100%; object-fit: cover; }
.cat-card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; font-weight: 600; }
.cat-card .more svg { width: 14px; height: 14px; }
.shop-why { grid-template-columns: repeat(4, 1fr); }
.shop-why .why-item svg { width: 26px; height: 26px; flex: none; }
.shop-why .why-item p { margin-top: 4px; }

/* Cartes article */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: box-shadow .2s, border-color .2s; }
.pcard:hover { box-shadow: var(--shadow-hover); border-color: var(--line-2); }
.pcard-img { display: grid; place-items: center; aspect-ratio: 4 / 3; background: #fff; border-bottom: 1px solid var(--line); color: var(--muted); }
.pcard-img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.pcard-img svg { width: 44px; height: 44px; opacity: .45; }
.pcard-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 16px 18px 18px; }
.pcard-meta { margin: 0; font-size: 12.5px; color: var(--muted); }
.pcard h3 { margin: 0; font-size: 16px; line-height: 1.35; }
.pcard h3 a { color: var(--text); text-decoration: none; }
.pcard h3 a:hover { text-decoration: underline; }
.pcard-sum { margin: 0; color: var(--muted); font-size: 14px; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.price { margin: 0; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.price small { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.price.big { font-size: 28px; margin: 18px 0 2px; }
.price.big small { font-size: 15px; }
.on-request { font-size: 14px; font-weight: 600; color: var(--muted); }
.btn-add { padding: 9px 14px; font-size: 14px; }
.btn-add svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.avail { margin: 0; font-size: 13px; font-weight: 600; color: var(--ok); }
.avail.sur_commande { color: #8a5a00; }
.avail.rupture { color: var(--err); }

/* Liste : barre de tri */
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; color: var(--muted); font-size: 14.5px; }
.shop-toolbar select { margin-left: 8px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); font: inherit; }

/* Fiche article */
.page-head.slim { padding: 18px 0 0; background: none; border: 0; }
.page-head.slim .crumbs { margin: 0; }
.section.tight { padding-top: 28px; }
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.product-img { display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--muted); }
.product-img img { width: 100%; height: 100%; object-fit: contain; padding: 28px; }
.product-img svg { width: 90px; height: 90px; opacity: .35; }
.product-info h1 { font-size: clamp(26px, 3.2vw, 36px); margin: 6px 0 10px; }
.add-form { margin: 22px 0 10px; }
.add-form label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 8px; }
.qty-row { display: flex; gap: 10px; flex-wrap: wrap; }
.qty-row input, input.qty { width: 96px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); font: inherit; text-align: center; background: var(--surface); }
input.qty { width: 84px; padding: 9px 10px; }
.h3 { font-size: 19px; margin: 28px 0 12px; }
.specs { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.specs th, .specs td { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.specs th { width: 42%; color: var(--muted); font-weight: 500; padding-right: 16px; }
.product-desc { margin-top: clamp(32px, 5vw, 56px); }

/* Panier */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(24px, 4vw, 44px); align-items: start; }
.table-scroll { overflow-x: auto; }
.cart-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px; }
.cart-table th { padding: 12px 14px; text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; background: var(--soft); white-space: nowrap; }
.cart-table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.cart-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cart-item { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.cart-item a { color: var(--text); font-weight: 600; text-decoration: none; }
.cart-item small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.cart-thumb { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 10px; background: #fff; border: 1px solid var(--line); overflow: hidden; color: var(--muted); }
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-thumb svg { width: 22px; height: 22px; opacity: .5; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 14px; }
.link-btn svg { width: 16px; height: 16px; }
.link-btn:hover { color: var(--text); }
.link-btn.danger:hover { color: var(--err); }
.cart-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.cart-actions .danger { margin-left: auto; }
.cart-side { display: grid; gap: 18px; position: sticky; top: 140px; }
.totals { padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.totals p { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.totals .ttc { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 19px; }
.quote-form .h3 { margin-top: 0; }
.quote-form .btn-block { margin-top: 20px; }
.quote-form .form-grid { gap: 14px 14px; }
.quote-form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 13.5px; }
.quote-form .consent input { width: auto; margin: 3px 0 0; }

/* Devis */
.quote-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.quote-doc { padding: clamp(22px, 4vw, 44px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.quote-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.quote-head img { height: 32px; width: auto; }
.quote-no { text-align: right; }
.quote-no h1 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 8px; }
.quote-no p { margin: 0; color: var(--muted); font-size: 14.5px; }
.quote-client { max-width: 420px; margin: 0 0 24px auto; padding: 16px 20px; border-radius: var(--radius-sm); background: var(--soft); }
.quote-client p { margin: 0; }
.quote-totals { max-width: 360px; margin: 18px 0 22px auto; }
.shop-footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.shop-steps-mini { color: #c7c7cc; }

@media (max-width: 960px) {
  .shop-hero-in, .product, .cart-layout { grid-template-columns: minmax(0, 1fr); }
  .cart-side { position: static; }
  .shop-why { grid-template-columns: 1fr 1fr; }
  .shop-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .shop-header .header-in { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .shop-header .shop-search { order: 3; flex-basis: 100%; max-width: none; }
  .cart-link span { display: none; }
  .shop-badge { display: none; }
  .shop-why, .shop-footer-grid { grid-template-columns: 1fr; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard-body { padding: 12px; }
  .pcard-foot { flex-direction: column; align-items: stretch; }
  .btn-add span { display: none; }
  .quote-no { text-align: left; }
  .shop-search.big .btn { padding: 10px 12px; } .shop-search.big .btn span, .shop-search.big .btn { font-size: 0; }
  .shop-search.big .btn svg { width: 17px; height: 17px; }
  /* panier : une carte par article */
  .cart .table-scroll { overflow: visible; }
  .cart .cart-table thead { display: none; }
  .cart .cart-table, .cart .cart-table tbody { display: block; border: 0; background: none; }
  .cart .cart-table tr { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 12px; align-items: center; margin-bottom: 10px; padding: 14px;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
  .cart .cart-table td { display: block; padding: 0; border: 0; }
  .cart .cart-table td.cart-item { grid-column: 1 / -1; min-width: 0; }
  .cart .cart-table td.num:nth-child(2) { grid-column: 1; text-align: left; color: var(--muted); font-size: 14px; }
  .cart .cart-table td:last-child { grid-row: 1; grid-column: 3; justify-self: end; }
  .cart .cart-table td.cart-item { grid-row: 1; grid-column: 1 / 3; }
}
@media print {
  .topbar, .header, .footer, .no-print, .wa-float, .action-bar { display: none !important; }
  .section { padding: 0; }
  .quote-doc { border: 0; box-shadow: none; padding: 0; }
  body { background: #fff; }
}

/* Pleine largeur : pas de marge latérale, catégories à gauche et articles à droite */
.shop .wrap { width: auto; max-width: none; margin-inline: 0; padding-inline: clamp(12px, 1.4vw, 20px); }
.shop-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: clamp(16px, 2vw, 28px); align-items: start;
  padding-top: 20px; padding-bottom: 48px; }
.cat-side { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; scrollbar-width: thin; }
.cat-box { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.cat-box summary { padding: 14px 16px; font-weight: 700; cursor: pointer; list-style: none; border-bottom: 1px solid var(--line); }
.cat-box summary::-webkit-details-marker { display: none; }
.cat-tree, .cat-tree ul { list-style: none; margin: 0; padding: 0; }
.cat-tree { padding: 8px; }
.cat-tree a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-size: 14.5px; }
.cat-tree a svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.cat-tree a span { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cat-tree a:hover { background: var(--soft); color: var(--text); }
.cat-tree a[aria-current="page"] { background: var(--soft-2); color: var(--text); font-weight: 700; }
.cat-tree > li > a { font-weight: 600; color: var(--text); }
.cat-tree ul { display: none; margin: 2px 0 6px 26px; border-left: 1px solid var(--line); padding-left: 6px; }
.cat-tree li.open > ul, .cat-tree > li:hover > ul, .cat-tree > li:focus-within > ul { display: block; }
.cat-tree ul a { padding: 6px 10px; font-size: 14px; }
.shop-main h1 { font-size: clamp(22px, 2.4vw, 30px); margin: 4px 0 0; }
.shop-main h1 small { margin-left: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.shop-main .shop-toolbar { align-items: flex-end; flex-wrap: wrap; }
.shop-main .crumbs { margin: 0; }
.shop .pgrid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.pager a, .pager span { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--pill);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); text-decoration: none; font-size: 14.5px; }
.pager span[aria-current] { background: var(--text); border-color: var(--text); color: #fff; font-weight: 700; }
.pager a:hover { border-color: var(--text); }
.market { margin: 0; font-size: 12px; color: var(--muted); }
.shop .page-head { padding-left: 0; padding-right: 0; }
@media (max-width: 960px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr); padding-top: 12px; }
  .cat-side { position: static; max-height: none; }
  .cat-box summary::after { content: " ▾"; color: var(--muted); }
  .cat-tree ul { display: block; }
}
