/*
 * Feuille de style du site stiens.be (pages publiques, espace client, espace vendeurs).
 * Couleurs : variables --brand, --bg... du theme (Php/theme.php), declarees dans chaque page.
 * Sans ressource externe (compatible avec la Content-Security-Policy du site).
 */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; background:var(--bg); color:var(--text); font:15px/1.5 Arial, Helvetica, sans-serif; min-height:100vh; display:flex; flex-direction:column; }
body > main { flex:1 0 auto; width:100%; }
a { color:var(--brand); }
img { max-width:100%; height:auto; }
.wrap { max-width:1200px; margin:0 auto; padding:0 16px; }
main { max-width:1200px; margin:0 auto; padding:20px 16px 40px; }

/* ---------- En-tete des espaces vendeurs (ui_page_start) ---------- */
header.top { background:var(--header-bg); color:var(--header-text); border-bottom:4px solid var(--brand); }
header.top .in { max-width:1200px; margin:0 auto; padding:10px 16px; display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
header.top img { height:56px; width:auto; display:block; }
header.top h1 { margin:0; font-size:20px; color:var(--brand); flex:1; min-width:180px; }
header.top .who { font-size:13px; text-align:right; }
header.top .who a { color:inherit; }

/* ---------- En-tete du site (ui_site_start) ---------- */
.site-top { background:var(--header-bg); color:var(--header-text); position:relative; z-index:30; }
.site-top .in { display:flex; align-items:center; gap:16px; padding:10px 16px; flex-wrap:wrap; }
.burger { display:inline-flex; flex-direction:column; justify-content:center; gap:5px; width:42px; height:42px; padding:0 10px; border:1px solid currentColor; border-radius:6px; cursor:pointer; flex:0 0 auto; }
.burger span { display:block; height:2px; background:currentColor; border-radius:2px; }
.burger:hover { background:rgba(0,0,0,.06); }
.site-logo { display:flex; align-items:center; gap:12px; text-decoration:none; color:inherit; }
.site-logo img { height:58px; width:auto; display:block; background:#fff; border-radius:6px; padding:2px; }
.site-logo .name { font-size:20px; font-weight:bold; line-height:1.1; }
.site-logo .name small { display:block; font-size:12px; font-weight:normal; opacity:.8; }
.site-search { flex:1; min-width:220px; display:flex; gap:6px; }
.site-search input { flex:1; min-width:0; }
.site-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; font-size:14px; }
.site-actions a { color:inherit; }
.site-actions .btn { color:#fff; }
.site-lang { font-weight:bold; text-decoration:none; border:1px solid currentColor; border-radius:4px; padding:2px 7px; }
.site-basket { display:inline-flex; align-items:center; gap:6px; text-decoration:none; font-weight:bold; }
.site-basket .count { display:inline-block; min-width:22px; padding:0 6px; border-radius:999px; background:var(--brand); color:#fff; text-align:center; font-size:13px; }

/* ---------- Menu : barre horizontale sur PC, panneau lateral ouvert par ☰ sur mobile ---------- */
.site-nav { background:var(--nav-bg); }
.site-nav .in { display:flex; flex-wrap:wrap; gap:2px 6px; padding:0 16px; }
.site-nav a { color:var(--nav-text); text-decoration:none; font-weight:bold; font-size:14px; padding:11px 10px; border-bottom:3px solid transparent; }
.site-nav a:hover { background:rgba(255,255,255,.1); }
.site-nav a.on { border-bottom-color:var(--nav-text); }
.site-nav a.nav-admin { margin-left:auto; }	/* Administration (comptes @stiens.be) : a droite de la barre */
.nav-toggle { position:absolute; opacity:0; width:1px; height:1px; pointer-events:none; }
.site-body { display:block; flex:1 0 auto; }
.site-body.catalog { display:grid; grid-template-columns:280px minmax(0, 1fr); }
.site-aside { display:none; background:var(--card); border-right:1px solid var(--line); min-width:0; }
.site-body.catalog .site-aside { display:block; }
.aside-menu { display:none; }
.aside-in { position:sticky; top:0; max-height:100vh; overflow-y:auto; padding:10px 0 24px; }
.aside-nav a { display:block; padding:8px 18px; text-decoration:none; color:var(--text); font-weight:bold; font-size:14px; }
.aside-nav a:hover { background:#F3F4F6; }
.aside-nav a.on { color:var(--brand); background:#F3F4F6; background:color-mix(in srgb, var(--brand) 10%, #fff); border-left:3px solid var(--brand); padding-left:15px; }
.aside-title { margin:16px 18px 6px; font-size:12px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); }
.site-aside .families { border:0; border-radius:0; padding:0; background:transparent; }
.aside-close, .nav-backdrop { display:none; }
.site-main { min-width:0; display:flex; flex-direction:column; }
.site-main > main { flex:1 0 auto; width:100%; }
@media (min-width: 1001px) {
  /* PC : pas de bouton ☰ ; familles du catalogue a gauche sur les pages du catalogue */
  .burger { display:none; }
}
@media (max-width: 1000px) {
  /* Mobile et tablette : barre remplacee par le panneau, qui s'ouvre par-dessus la page */
  .site-nav { display:none; }
  .site-body, .site-body.catalog { display:block; }
  .aside-menu { display:block; }
  .site-aside, .site-body.catalog .site-aside { display:block; position:fixed; top:0; bottom:0; left:0; width:300px; max-width:86vw; z-index:50; transform:translateX(-105%); transition:transform .2s ease; box-shadow:0 0 24px rgba(0,0,0,.25); }
  .aside-in { position:static; max-height:none; height:100%; }
  .nav-toggle:checked ~ .site-body .site-aside { transform:none; }
  .nav-toggle:checked ~ .site-body .nav-backdrop { display:block; position:fixed; top:0; right:0; bottom:0; left:0; background:rgba(0,0,0,.45); z-index:40; }
  .aside-close { display:block; padding:12px 18px; font-weight:bold; cursor:pointer; border-bottom:1px solid var(--line); }
}
/* ---------- Pied de page (ui_site_end) ---------- */
.site-foot { background:var(--header-bg); color:var(--header-text); margin-top:32px; font-size:14px; line-height:1.6; }
.site-foot a { color:inherit; text-decoration:none; opacity:.85; }
.site-foot a:hover { opacity:1; text-decoration:underline; }
.site-foot .btn { opacity:1; color:#fff; text-decoration:none; }
.foot-cols { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:28px 32px; padding:32px 0 24px; }
.foot-col h2 { margin:0 0 12px; font-size:13px; text-transform:uppercase; letter-spacing:.6px; }
.foot-col h2::after { content:''; display:block; width:28px; height:2px; margin-top:6px; background:var(--brand); }
.foot-col p { margin:0 0 10px; }
.foot-col ul { list-style:none; margin:0 0 12px; padding:0; }
.foot-col li { margin-bottom:6px; }
.foot-brand { display:flex; align-items:center; gap:10px; margin-bottom:10px; font-size:16px; }
.foot-brand img { background:#fff; border-radius:4px; padding:2px; width:auto; height:40px; }
.foot-muted, .foot-hours li { opacity:.75; }
.foot-hours strong { opacity:1; }
.foot-bottom { display:flex; flex-wrap:wrap; gap:8px 24px; justify-content:space-between; align-items:center; padding:14px 0 18px; border-top:1px solid rgba(127,127,127,.3); font-size:12px; opacity:.8; }
.theme-pick { font-size:12px; }
.theme-pick a { margin-right:6px; text-decoration:underline; }

/* ---------- Composants ---------- */
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:16px; margin-bottom:16px; }
.card h2 { margin:0 0 12px; font-size:13px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); }
.card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.card-head h2 { margin:0; }

/* ---------- Administration : menu a gauche (staff_nav, option 'side' de ui_site_start) ---------- */
.side-layout { display:grid; grid-template-columns:240px minmax(0, 1fr); gap:24px; align-items:start; }
.side-main { min-width:0; overflow-x:auto; }
main:has(> .side-layout) { max-width:1480px; }	/* administration : tableaux larges a cote du menu */
@media (min-width: 761px) {
  table.orders td[data-label="Relance"] { min-width:170px; }	/* Paniers en cours : compteur et bouton lisibles */
  table.orders td[data-label="Dates"] { min-width:110px; }
}
.nowrap { white-space:nowrap; }
.admin-side { position:sticky; top:16px; background:var(--card); border:1px solid var(--line); border-radius:8px; padding:6px 0 10px; }
.admin-side-title { margin:12px 16px 4px; font-size:11px; font-weight:bold; text-transform:uppercase; letter-spacing:.6px; color:var(--muted); }
.admin-side a { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 16px 8px 13px; border-left:3px solid transparent;
  color:var(--text); text-decoration:none; font-weight:bold; font-size:14px; }
.admin-side a:hover { background:#F3F4F6; }
.admin-side a.on { color:var(--brand); border-left-color:var(--brand); background:#F3F4F6; background:color-mix(in srgb, var(--brand) 10%, #fff); }
.admin-side .alert { flex:0 0 auto; min-width:20px; padding:0 6px; border-radius:999px; background:var(--danger); color:#fff; font-size:12px; text-align:center; }
@media (max-width: 1000px) {
  /* Mobile et tablette : menu en boutons au-dessus du contenu */
  .side-layout { grid-template-columns:minmax(0, 1fr); gap:14px; }
  /* une ligne qu'on fait glisser (le menu complet prendrait la moitie de l'ecran sur un telephone) */
  .admin-side { position:static; display:flex; flex-wrap:nowrap; gap:6px; padding:8px; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:thin; }
  .admin-side a { flex:0 0 auto; white-space:nowrap; }
  .admin-side-group { display:contents; }
  .admin-side-title { display:none; }
  .admin-side a { padding:6px 12px; border:1px solid var(--line); border-radius:999px; font-size:13px; }
  .admin-side a.on { background:var(--brand); border-color:var(--brand); color:#fff; order:-1; }	/* page en cours toujours visible */
  .admin-side a.on .alert { background:#fff; color:var(--brand); }
}
/* Messages (tickets) : fil de la conversation, client a gauche, Stiens a droite */
.thread { display:flex; flex-direction:column; gap:12px; }
.msg { max-width:80%; padding:10px 14px; border-radius:10px; background:#F3F4F6; border:1px solid var(--line); }
.msg-stiens { align-self:flex-end; background:#F3F4F6; background:color-mix(in srgb, var(--brand) 9%, #fff); border-color:color-mix(in srgb, var(--brand) 25%, #fff); }
.msg-head { font-size:13px; margin-bottom:4px; }
.msg-head span { color:var(--muted); }
.msg-text { overflow-wrap:anywhere; }
.msg-basket { margin-top:8px; padding-top:8px; border-top:1px dashed var(--line); font-size:13px; }
.msg-basket ul { margin:4px 0 0; padding-left:18px; }
@media (max-width: 760px) { .msg { max-width:100%; } }

/* Demandes de modification : detail avant -> apres */
.changes { list-style:none; margin:0; padding:0; }
.changes li { margin-bottom:4px; }
.changes .old { color:var(--muted); text-decoration:line-through; }
.changes .new { font-weight:bold; }
.focus-card { border-left:4px solid var(--brand); }

/* ---------- Administration (/admin) : chiffres du tableau de bord, deux colonnes ---------- */
.admin-stats { display:grid; grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); gap:12px; margin:0 0 20px; }
.admin-stat { display:flex; flex-direction:column; gap:2px; padding:14px 16px; border:1px solid var(--line); border-left:4px solid var(--line); border-radius:8px;
  background:var(--card); color:var(--text); text-decoration:none; }
.admin-stat:hover { border-color:var(--brand); }
.admin-stat .n { font-size:28px; font-weight:bold; line-height:1.1; }
.admin-stat .l { font-weight:bold; }
.admin-stat.alert { border-left-color:var(--brand); }
.admin-stat.alert .n { color:var(--brand); }
.admin-cols { display:grid; grid-template-columns:repeat(auto-fit, minmax(340px, 1fr)); gap:16px; align-items:start; }
.admin-cols .card-head h2 { font-size:17px; }

/* Administration > Serveur : resume et listes de controles (point vert / orange / rouge / gris) */
.srv-summary { display:flex; align-items:flex-start; gap:14px; line-height:24px; padding:16px 18px; margin-bottom:16px; border-radius:8px; border:1px solid var(--line); background:var(--card); }
.srv-summary strong { font-size:17px; }
.srv-summary .dot, .check .dot { flex:0 0 auto; width:12px; height:12px; border-radius:50%; background:#9CA3AF; }
.srv-summary .dot { width:16px; height:16px; margin-top:4px; }	/* centre sur la ligne du titre */
.srv-summary .small { line-height:1.4; }
.srv-summary.st-ok, .check.st-ok .dot { --st:var(--ok); }
.srv-summary.st-warn, .check.st-warn .dot { --st:var(--warn); }
.srv-summary.st-ko, .check.st-ko .dot { --st:var(--danger); }
.srv-summary { border-left:5px solid var(--st, var(--line)); }
.srv-summary .dot, .check .dot { background:var(--st, #9CA3AF); }
.srv h2 { font-size:17px; margin:0 0 6px; }
.checks { list-style:none; margin:0; padding:0; }
.check { display:grid; grid-template-columns:12px minmax(180px, 280px) minmax(0, 1fr); gap:6px 14px; align-items:start; padding:11px 0; border-top:1px solid var(--line); line-height:22px; }
.check:first-child { border-top:0; }
.check .dot { margin-top:5px; }	/* centre sur la premiere ligne de texte (hauteur de ligne 22px) */
.check .val small { line-height:1.4; }
.check .lbl { font-weight:bold; }
.check .val small { display:block; color:var(--muted); font-size:13px; margin-top:2px; }
.check.st-ko .val small { color:var(--danger); }
@media (max-width: 760px) {
  .check { grid-template-columns:12px minmax(0, 1fr); }
  .check .val { grid-column:2; }
}
h1.page { font-size:24px; margin:0 0 16px; color:var(--text); }
.chips { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.chip { display:inline-block; padding:6px 12px; border-radius:999px; border:1px solid var(--line); background:var(--card); color:var(--text); text-decoration:none; font-size:14px; }
.chip.on { background:var(--brand); border-color:var(--brand); color:#fff; }
.chip .n { opacity:.75; margin-left:4px; }

/* ---------- Filtres des listes d'articles (shop_filters.php) : bouton, puces, panneau lateral droit ---------- */
.list-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.list-head h1.page { margin:0; }
.list-head .filter-btn { margin-left:auto; }
.filter-btn { display:inline-flex; align-items:center; gap:6px; cursor:pointer; user-select:none; }
.filter-btn .count { display:inline-block; min-width:20px; padding:0 6px; border-radius:999px; background:var(--brand); color:#fff; font-size:12px; text-align:center; }
.filter-chips { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 14px; }
.filter-chips .chip { cursor:pointer; padding:4px 10px; font-size:13px; }
.link-btn, button.link-btn { background:none; border:0; padding:0; color:var(--brand); text-decoration:underline; cursor:pointer; font:inherit; font-size:13px; }
.link-btn:hover, button.link-btn:hover { background:none; color:var(--brand-dark); }
/* Calque de la taille de l'ecran qui coupe le panneau ferme (sinon Chrome Android elargit la page) */
.filter-layer { position:fixed; top:0; right:0; bottom:0; left:0; overflow:hidden; pointer-events:none; z-index:60; }
.filter-panel { position:absolute; top:0; right:0; bottom:0; width:360px; max-width:92%; background:var(--card); box-shadow:0 0 24px rgba(0,0,0,.25);
  transform:translateX(105%); visibility:hidden; transition:transform .2s ease, visibility .2s; pointer-events:auto; }
.filter-panel form { display:flex; flex-direction:column; height:100%; }
.filter-head { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--line); font-size:17px; }
.filter-close { font-size:26px; line-height:1; cursor:pointer; padding:0 4px; color:var(--muted); }
.filter-body { flex:1; overflow-y:auto; padding:18px 18px 20px; }
.filter-body fieldset { border:0; margin:0 0 32px; padding:0; min-width:0; }
.filter-body fieldset:last-child { margin-bottom:0; }
.filter-body legend { padding:0; margin-bottom:10px; font-size:15px; font-weight:bold; color:var(--text); }
.filter-body input[type=search], .filter-body select { width:100%; }
.filter-body small { display:block; color:var(--muted); font-size:12px; margin-top:4px; }
.filter-check { display:flex; gap:10px; align-items:flex-start; padding:6px 0; cursor:pointer; }
.filter-check input { width:18px; height:18px; margin:2px 0 0; accent-color:var(--brand); flex:0 0 auto; }
.filter-check small { margin-top:0; display:block; color:var(--muted); font-size:12px; }
.filter-presets { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.filter-presets .chip { cursor:pointer; padding:5px 11px; font-size:13px; }
.filter-presets .chip:not(.on):hover { background:#F3F4F6; border-color:var(--brand); color:var(--brand); }
.filter-range { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:10px; }
.filter-range label { font-size:13px; color:var(--muted); }
.filter-money { display:flex; align-items:center; margin-top:4px; border:1px solid #D1D5DB; border-radius:6px; background:#fff; }
.filter-money:focus-within { border-color:var(--brand); }
.filter-money input { flex:1; width:100%; min-width:0; border:0; background:transparent; outline:0; }
.filter-money span { padding:0 10px 0 2px; color:var(--muted); }
.filter-default { position:absolute; width:1px; height:1px; padding:0; border:0; overflow:hidden; clip:rect(0 0 0 0); }
.filter-foot { display:flex; gap:10px; padding:12px 18px; border-top:1px solid var(--line); background:var(--card); }
.filter-foot button { flex:1; }
#filter-toggle:checked ~ .filter-layer .filter-panel { transform:none; visibility:visible; }
#filter-toggle:checked ~ .filter-backdrop { display:block; position:fixed; top:0; right:0; bottom:0; left:0; background:rgba(0,0,0,.45); z-index:55; }
.filter-backdrop { display:none; }
body:has(#filter-toggle:checked), body:has(#nav-toggle:checked) { overflow:hidden; }
form.search { display:flex; gap:8px; margin-bottom:16px; }
input[type=search], input[type=text], input[type=email], input[type=password], input[type=number], select, textarea { font:inherit; padding:8px 10px; border:1px solid #D1D5DB; border-radius:6px; background:#fff; color:#111827; }
input[type=search] { flex:1; min-width:0; }
textarea { width:100%; min-height:70px; }
button, .btn { font:inherit; padding:8px 16px; border-radius:6px; border:1px solid var(--brand); background:var(--brand); color:#fff; cursor:pointer; text-decoration:none; display:inline-block; }
button:hover, .btn:hover { background:var(--brand-dark); border-color:var(--brand-dark); }
.btn-light, button.btn-light { background:#fff; color:var(--brand); }
.btn-light:hover, button.btn-light:hover { background:#F3F4F6; color:var(--brand-dark); }
.btn-small { padding:4px 10px; font-size:13px; }
.btn-danger, button.btn-danger { background:#fff; color:var(--danger); border-color:var(--danger); }
.btn-danger:hover, button.btn-danger:hover { background:#FEF2F2; color:var(--danger); border-color:var(--danger); }
button:disabled { opacity:.5; cursor:not-allowed; }
table.list { width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--line); border-radius:8px; overflow:hidden; }
table.list th { text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); background:#F9FAFB; padding:10px 12px; border-bottom:1px solid var(--line); }
table.list td { padding:12px; border-bottom:1px solid var(--line); vertical-align:top; }
table.list tr:last-child td { border-bottom:0; }
table.list tr:hover td { background:#F9FAFB; }
table.list .num, .num { text-align:right; white-space:nowrap; }
.small { font-size:13px; color:var(--muted); }
.badge { display:inline-block; padding:3px 10px; border-radius:999px; color:#fff; font-size:12px; font-weight:bold; white-space:nowrap; }
.badge-default { background:var(--ok); }
.grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:16px; }
dl { margin:0; display:grid; grid-template-columns:auto 1fr; gap:4px 12px; }
dt { color:var(--muted); font-size:13px; }
dd { margin:0; }
.flash { padding:12px 16px; border-radius:6px; margin-bottom:16px; font-weight:bold; }
.flash-ok { background:#ECFDF5; color:#065F46; border:1px solid #A7F3D0; }
.flash-error { background:#FEF2F2; color:#991B1B; border:1px solid #FECACA; }
.flash-info { background:#EFF6FF; color:#1E3A8A; border:1px solid #BFDBFE; }
.empty { padding:32px; text-align:center; color:var(--muted); background:var(--card); border:1px dashed var(--line); border-radius:8px; }
.comment { white-space:pre-wrap; background:#F9FAFB; border-left:3px solid var(--brand); padding:10px 14px; }
ol.history { margin:0; padding-left:18px; }
ol.history li { margin-bottom:8px; }
nav.tabs { background:var(--card); border-bottom:1px solid var(--line); }
nav.tabs .in { max-width:1200px; margin:0 auto; padding:0 16px; display:flex; flex-wrap:wrap; gap:0 4px; }
nav.tabs a { padding:12px 14px; text-decoration:none; color:var(--muted); border-bottom:3px solid transparent; white-space:nowrap; font-weight:bold; }
nav.tabs a.on { color:var(--brand); border-bottom-color:var(--brand); }
nav.tabs .alert { display:inline-block; min-width:20px; padding:0 6px; margin-left:6px; border-radius:999px; background:var(--danger); color:#fff; font-size:12px; text-align:center; }
.ok { color:var(--ok); font-weight:bold; } .ko { color:var(--danger); font-weight:bold; }
.form-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:12px 16px; }
.form-grid label { display:block; font-size:13px; color:var(--muted); }
.form-grid input[type=text], .form-grid input[type=email], .form-grid input[type=password], .form-grid select { display:block; width:100%; margin-top:4px; }
.form-grid .wide { grid-column:1 / -1; }
.form-narrow { max-width:520px; }
.inline { display:inline; margin:0; }
code { font-size:12px; color:var(--muted); word-break:break-all; }
.hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }

/* Liste des articles dans une cellule (Mes commandes) : quantite, code, description, montant */
ul.items { list-style:none; margin:0; padding:0; }
ul.items li { display:grid; grid-template-columns:4.5em 9em 1fr auto; gap:0 14px; padding:4px 0; border-bottom:1px dashed var(--line); }
ul.items li:last-child { border-bottom:0; }
ul.items li.more { display:block; padding-top:6px; }
ul.items .q { text-align:right; white-space:nowrap; font-weight:bold; }
ul.items .c { color:var(--muted); font-size:13px; overflow-wrap:anywhere; padding-top:1px; }
ul.items .a { text-align:right; white-space:nowrap; color:var(--muted); }
table.list td.wide-cell { width:55%; }
.mobile-only, ul.items li.mobile-only { display:none; }

/* ---------- Accueil ---------- */
.hero { background:var(--header-bg); border-radius:10px; overflow:hidden; margin-bottom:16px; display:flex; justify-content:center; }
.hero img { display:block; width:100%; max-width:1000px; }
.notice { background:#FFFBEB; border:1px solid #FDE68A; color:#78350F; border-radius:8px; padding:12px 16px; margin-bottom:16px; font-weight:bold; }
.intro { display:grid; grid-template-columns:2fr 1fr; gap:16px; }
.intro h3 { margin:14px 0 4px; color:var(--accent); font-size:16px; }
.intro h3:first-child { margin-top:0; }
.intro p { margin:0 0 6px; }
.tiles { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:16px; }
.tile { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:14px 16px; }
.tile h3 { margin:0 0 8px; font-size:16px; }
.tile h3 a { color:var(--text); text-decoration:none; }
.tile ul { list-style:none; margin:0; padding:0; columns:1; }
.tile li { padding:2px 0; font-size:14px; }
.tile li a { text-decoration:none; }
.tile li a:hover { text-decoration:underline; }

/* ---------- Catalogue ---------- */
.families { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:8px 0; font-size:14px; }
.families details { border-bottom:1px solid var(--line); }
.families details:last-child { border-bottom:0; }
.families summary { cursor:pointer; padding:8px 14px; font-weight:bold; list-style:none; display:flex; justify-content:space-between; gap:8px; }
.families summary::-webkit-details-marker { display:none; }
.families summary::after { content:'+'; color:var(--muted); flex:0 0 auto; }
.families details[open] summary::after { content:'–'; }
.families ul { list-style:none; margin:0; padding:0 0 8px; }
.families li a { display:block; padding:4px 14px 4px 24px; text-decoration:none; color:var(--text); }
.families li a:hover { background:#F3F4F6; }
.families li a.on { color:var(--brand); font-weight:bold; background:#F3F4F6; background:color-mix(in srgb, var(--brand) 10%, #fff); border-left:3px solid var(--brand); padding-left:21px; }
.crumbs { font-size:13px; color:var(--muted); margin-bottom:6px; }
.crumbs a { color:var(--muted); }
table.articles td { vertical-align:middle; }
table.articles .ph { width:84px; }
table.articles .ph img { width:auto; max-width:72px; max-height:96px; border-radius:4px; border:1px solid var(--line); display:block; background:#fff; }
/* Article sans photo : pictogramme "photo absente" en fond (ni selectionnable, ni requete supplementaire) */
table.articles .ph .noimg { width:72px; height:54px; border-radius:4px; border:1px dashed #D1D5DB; user-select:none; pointer-events:none;
  background:#F3F4F6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='10' r='1.6'/%3E%3Cpath d='M21 16l-5-5-8 8'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E") center / 26px no-repeat; }
table.articles .code { white-space:nowrap; font-family:Consolas, monospace; font-size:13px; }
table.articles .desc .alt { color:var(--danger); font-size:13px; }
table.articles .price { font-weight:bold; white-space:nowrap; text-align:right; }
table.articles .stock { text-align:right; white-space:nowrap; }
table.articles .add form { display:flex; gap:6px; justify-content:flex-end; }
table.articles .add input { width:64px; text-align:right; }
.pager { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0; }
.pager a, .pager span { display:inline-block; min-width:36px; padding:6px 10px; border:1px solid var(--line); border-radius:6px; text-align:center; text-decoration:none; background:var(--card); font-size:14px; }
.pager span.on { background:var(--brand); border-color:var(--brand); color:#fff; font-weight:bold; }
.pager span.gap { border:0; background:transparent; min-width:auto; padding:6px 2px; }
.prose { max-width:900px; }
.prose p { margin:0 0 8px; }
.media { display:grid; grid-template-columns:260px 1fr; gap:16px; align-items:start; }
.media img { border-radius:6px; display:block; }
.links-list { list-style:none; margin:0; padding:0; }
.links-list li { padding:8px 0; border-bottom:1px solid var(--line); }
.links-list li:last-child { border-bottom:0; }
.links-list .sub { font-size:13px; color:var(--muted); }

/* ---------- Petits ecrans ---------- */
@media (max-width: 900px) {
  .intro, .media { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
  .foot-cols { grid-template-columns:1fr 1fr; gap:24px 20px; padding-top:24px; }
  .foot-col:first-child { grid-column:1 / -1; }
  nav.tabs .in { flex-wrap:wrap; gap:0; padding:0 6px; }
  nav.tabs a { padding:10px; }
  table.list thead { display:none; }
  table.list, table.list tbody, table.list tr, table.list td { display:block; width:100%; }
  table.list tr { border-bottom:1px solid var(--line); padding:8px 0; }
  table.list td { border:0; padding:4px 12px; }
  table.list td[data-label]:not([data-label=""])::before { content:attr(data-label) " : "; color:var(--muted); font-size:13px; }
  table.list .num, .num { text-align:left; }
  header.top .who { text-align:left; width:100%; }
  table.list td.wide-cell { width:100%; }
  ul.items li { grid-template-columns:auto 1fr; gap:0 8px; padding:2px 0; border:0; }
  ul.items .c, ul.items .a, ul.items .pc-only, ul.items li.pc-only { display:none; }
  ul.items li.mobile-only { display:block; }
  /* Catalogue : une carte par article (photo a gauche, prix et commande en bas) */
  table.articles tr { display:grid; grid-template-columns:84px 1fr; gap:4px 12px; padding:12px; }
  table.articles td { padding:0; }
  table.articles td[data-label]:not([data-label=""])::before { content:none; }
  table.articles .ph { grid-row:1 / span 4; }
  table.articles .code { font-size:12px; color:var(--muted); }
  table.articles .price, table.articles .stock { text-align:left; }
  table.articles .stock::before { content:attr(data-label) " : " !important; color:var(--muted); font-size:13px; }
  table.articles .add form { justify-content:flex-start; }
  .site-top .in { gap:10px; }
  .site-logo img { height:44px; }
  .site-logo .name { font-size:17px; }
  .site-search { order:3; flex-basis:100%; }
  .site-actions { margin-left:auto; }
  .site-actions .hide-sm, .site-basket .tot, .site-logo .name small { display:none; }
  .tiles { grid-template-columns:1fr; }
}
