:root {
  --brand: #0e6bdb;
  --brand-dark: #0a55b0;
  --brand-soft: #eaf3ff;
  --accent: #ffb020;
  --ink: #0f1b2d;
  --muted: #5d6b80;
  --line: #e2e8f0;
  --bg: #f6f8fb;
  --card: #ffffff;
  --ok: #12a46b;
  --danger: #e0434b;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(15, 40, 90, .08);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); line-height: 1.5; overflow-wrap: break-word; -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
/* Icône de catégorie en image (à la place d'un emoji) : même taille que le texte qui l'entoure */
.icon-img { width: 1.15em; height: 1.15em; vertical-align: -0.2em; display: inline-block; }

/* ---------- Bandeau + en-tête ---------- */
.topbar { background: var(--ink); color: #fff; font-size: 13px; text-align: center; padding: 7px 16px; }
.topbar strong { color: var(--accent); }
header.site { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 20px; height: 70px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 24px; color: var(--ink); letter-spacing: -.5px; }
.logo:hover { text-decoration: none; }
.logo span { color: var(--brand); }
.header-actions { display: flex; gap: 6px; margin-left: auto; }
.header-actions a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 14px; position: relative; }
.header-actions a:hover { background: var(--brand-soft); text-decoration: none; }
.header-actions a.cta { background: var(--brand); color: #fff; }
.header-actions a.cta:hover { background: var(--brand-dark); }
.cart-count { background: var(--accent); color: var(--ink); border-radius: 999px; font-size: 12px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0 5px; }
nav.cats { background: #fff; border-bottom: 1px solid var(--line); }
nav.cats .container { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 10px; padding-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
nav.cats a { white-space: nowrap; padding: 7px 14px; border-radius: 999px; color: var(--muted); font-size: 13.5px; font-weight: 600; letter-spacing: .1px; transition: background .15s, color .15s; }
nav.cats a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
nav.cats a.active { background: var(--brand); color: #fff; }
nav.cats a.compare { color: var(--brand); border: 1.5px solid var(--brand); padding: 5.5px 14px; }
nav.cats a.compare:hover, nav.cats a.compare.active { background: var(--brand); color: #fff; }

/* ---------- Boutons, champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 12px 22px; font-weight: 700; font-size: 15px; cursor: pointer; background: var(--brand); color: #fff; transition: background .15s, transform .1s; text-align: center; }
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.accent { background: var(--accent); color: var(--ink); }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
input, select, textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.check input { width: auto; margin-top: 3px; }
.field { margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert.error { background: #fdecee; color: #a3242b; }
.alert.ok { background: #e6f7ef; color: #0b6d47; }
.alert.info { background: var(--brand-soft); color: var(--brand-dark); }
.segmented { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.segmented label { margin: 0; padding: 9px 16px; cursor: pointer; font-weight: 600; font-size: 14px; }
.segmented input { display: none; }
.segmented label:has(input:checked) { background: var(--brand); color: #fff; }

/* ---------- Accueil ---------- */
.hero { background: radial-gradient(1000px 400px at 85% -10%, #3fa0ff 0%, transparent 60%), linear-gradient(135deg, #08214a, var(--brand)); color: #fff; padding: 56px 0 64px; }
.hero .container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.5vw, 48px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -1px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 18px; opacity: .9; margin: 0 0 28px; max-width: 540px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.1); }
.hero-visual { display: grid; gap: 12px; }
.hero-visual div { background: rgba(255,255,255,.12); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; padding: 14px 18px; display: flex; gap: 14px; align-items: center; font-size: 15px; }
.hero-visual b { display: block; }
.hero-visual .ico { font-size: 24px; }
.hero-visual .ok { margin-left: auto; color: #6ee7b7; font-weight: 700; font-size: 13px; white-space: nowrap; }

.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -32px; position: relative; }
.trust div { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; gap: 12px; align-items: center; font-size: 14px; }
.trust b { display: block; font-size: 15px; }
.trust .ico { font-size: 22px; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; flex-shrink: 0; font-weight: 800; color: var(--brand); }

section.block { padding: 48px 0 8px; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 20px; gap: 16px; }
.section-head h2 { margin: 0; font-size: 26px; letter-spacing: -.5px; }
.cat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cat-tile { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); color: var(--ink); display: flex; gap: 14px; align-items: flex-start; transition: transform .15s; }
.cat-tile:hover { transform: translateY(-3px); text-decoration: none; }
.cat-tile .ico { font-size: 28px; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; background: var(--brand-soft); }
.cat-tile b { display: block; font-size: 16px; }
.cat-tile small { color: var(--muted); font-size: 14px; }

/* ---------- Cartes offre ---------- */
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.offer { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; border: 2px solid transparent; transition: transform .15s, box-shadow .15s; }
.offer:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(15, 40, 90, .14); }
.offer.highlight { border-color: var(--brand); }
.offer-top { height: 6px; background: var(--brand); }
/* Illustration des cartes : cadre 2:1 (moitié de la hauteur d'origine), l'image garde ses proportions et est centrée.
   L'image est en absolu : sinon sa taille naturelle agrandit le cadre et le format 8:3 est ignoré. */
.offer-img { display: block; position: relative; aspect-ratio: 2 / 1; background: #fff; border-bottom: 1px solid var(--line); }
.offer-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.pdp-img { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 18px; padding: 16px; text-align: center; }
.pdp-img img { max-height: 420px; object-fit: contain; }
.desc p:first-child { margin-top: 0; }
.offer .body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.offer .tagline { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.offer h3 { font-size: 18px; margin: 0; line-height: 1.25; }
.offer h3 a { color: var(--ink); }
.offer p { margin: 0; font-size: 14px; color: var(--muted); }
.badge { background: var(--accent); color: var(--ink); font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .3px; }
.price-block { margin-top: 4px; }
.price-block .price { font-size: 26px; font-weight: 800; color: var(--brand); letter-spacing: -.5px; }
.price-block .unit { font-size: 14px; color: var(--muted); font-weight: 600; }
.price-block small { display: block; color: var(--muted); font-size: 12px; }
small.ttc { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.price-block .from { font-size: 13px; color: var(--muted); font-weight: 600; display: block; }
ul.feat { list-style: none; padding: 0; margin: 4px 0 0; font-size: 14px; }
ul.feat li { padding: 3px 0 3px 24px; position: relative; }
ul.feat li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.offer .actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.offer .actions .btn { flex: 1; }

/* ---------- Catalogue ---------- */
.cat-hero { padding: 28px 0 8px; }
.cat-hero h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: -.5px; }
.cat-hero p { margin: 0; color: var(--muted); font-size: 17px; }
.breadcrumb { font-size: 13px; color: var(--muted); padding-top: 18px; }

/* ---------- Fiche offre ---------- */
.pdp { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; padding: 24px 0 40px; align-items: start; }
.pdp h1 { margin: 0 0 6px; font-size: 32px; letter-spacing: -.5px; }
.pdp .lead { font-size: 17px; color: var(--muted); }
.pdp .desc { white-space: pre-line; }
.buy-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; position: sticky; top: 90px; }
.buy-box .price-block .price { font-size: 34px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; margin-top: 10px; cursor: pointer; font-weight: 400; }
.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.opt input { width: auto; margin-top: 4px; }
.opt b { display: block; font-size: 14px; }
.opt small { color: var(--muted); }
.opt .opt-price { margin-left: auto; font-weight: 700; white-space: nowrap; font-size: 14px; }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; width: fit-content; background: #fff; }
.qty button { border: 0; background: none; width: 38px; height: 42px; font-size: 18px; cursor: pointer; color: var(--brand); }
.qty input { width: 56px; text-align: center; border: 0; padding: 0; }
.estimate { background: var(--bg); border-radius: 10px; padding: 12px 14px; margin-top: 14px; font-size: 14px; }
.estimate .row { display: flex; justify-content: space-between; gap: 8px; }

/* ---------- Comparatif maintenance ---------- */
.compare-wrap { overflow-x: auto; }
table.compare { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 680px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
table.compare th, table.compare td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: center; font-size: 14px; }
table.compare th:first-child, table.compare td:first-child { text-align: left; }
table.compare thead th { vertical-align: top; padding-top: 20px; }
table.compare thead th h3 { margin: 0 0 6px; font-size: 18px; }
table.compare .hl { background: var(--brand-soft); }
table.compare .compare-img { display: block; width: 96px; height: 96px; object-fit: contain; margin: 10px auto 10px; }
table.compare .yes { color: var(--ok); font-weight: 800; font-size: 18px; }
table.compare .no { color: #c4ccd8; }
table.compare tfoot td { border-bottom: 0; padding-bottom: 20px; }

/* ---------- Demande ---------- */
.two-col { display: grid; grid-template-columns: 1fr 380px; gap: 24px; padding: 28px 0 48px; align-items: start; }
.sel-line { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sel-line .remove { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 20px; }
.sel-line .amounts { text-align: right; font-size: 14px; white-space: nowrap; }
.summary .row { display: flex; justify-content: space-between; margin: 8px 0; gap: 8px; }
.summary .total { font-size: 18px; font-weight: 800; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.summary h3 { margin: 0 0 4px; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }

/* ---------- Suivi / listes ---------- */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
table.list td.num, table.list th.num { text-align: right; white-space: nowrap; }
.status { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.status.new { background: #fff4dc; color: #8a5a00; }
.status.accepted, .status.active { background: #e6f7ef; color: var(--ok); }
.status.refused, .status.cancelled { background: #fdecee; color: var(--danger); }
.timeline { display: flex; gap: 6px; margin: 18px 0; flex-wrap: wrap; }
.timeline span { flex: 1; min-width: 120px; padding: 8px 10px; border-radius: 8px; background: var(--bg); font-size: 13px; font-weight: 600; color: var(--muted); text-align: center; }
.timeline span.done { background: var(--brand-soft); color: var(--brand); }

/* ---------- Administration ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 12px 18px; font-weight: 700; font-size: 15px; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.editor-line { display: grid; grid-template-columns: 1fr 70px 110px 110px 32px; gap: 8px; align-items: end; margin-bottom: 8px; }
.editor-line .remove { background: none; border: 0; color: var(--danger); font-size: 20px; cursor: pointer; height: 42px; }
dialog { border: 0; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.25); padding: 0; width: min(860px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; }
dialog::backdrop { background: rgba(15, 27, 45, .5); }
dialog .card { box-shadow: none; }

/* ---------- Pages texte ---------- */
.prose { max-width: 820px; padding: 32px 0 56px; }
.prose h1 { font-size: 30px; }
.prose h2 { font-size: 20px; margin-top: 32px; }
.prose .todo, .preview .todo { background: #fff7e0; border-left: 4px solid var(--accent); padding: 2px 6px; color: inherit; }
.preview { border: 1.5px dashed var(--line); border-radius: 10px; padding: 4px 16px; max-height: 520px; overflow: auto; background: #fff; }
.img-field { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.img-field img { width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.admin-help { font-size: 13px; color: var(--muted); margin: -8px 0 14px; }
fieldset { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px 18px 4px; margin: 0 0 18px; }
legend { font-weight: 700; padding: 0 6px; }

/* ---------- Pied de page ---------- */
footer.site { background: var(--ink); color: #c8d2e0; margin-top: 48px; padding: 44px 0 24px; font-size: 14px; }
footer.site .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; }
footer.site h4 { color: #fff; margin: 0 0 12px; font-size: 15px; }
footer.site a, footer.site .cols span { color: #c8d2e0; display: block; padding: 3px 0; }
footer.site a.logo { color: #fff; margin-bottom: 10px; display: flex; }
footer.site .logo span { display: inline; padding: 0; color: var(--brand-soft); }
footer.site .legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 18px; font-size: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%) translateY(120px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 600; transition: transform .25s; z-index: 50; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Écrans tactiles : pas d'effet de survol « collant » ---------- */
@media (hover: none) {
  .offer:hover, .cat-tile:hover { transform: none; }
  .offer:hover { box-shadow: var(--shadow); }
}

/* ---------- Tablette ---------- */
@media (max-width: 1100px) {
  .trust { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr 340px; }
  .pdp { gap: 24px; }
  footer.site .cols { grid-template-columns: 1fr 1fr 1fr; }
  footer.site .cols > :first-child { grid-column: 1 / -1; }
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .hero .container, .pdp, .two-col { grid-template-columns: 1fr !important; }
  .hero { padding: 40px 0 56px; }
  .hero-visual { display: none; }
  .trust { grid-template-columns: 1fr 1fr; }
  .cat-tiles { grid-template-columns: 1fr 1fr; }
  .buy-box { position: static; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .header-row { height: 60px; gap: 10px; }
  .logo { font-size: 20px; }
  .header-actions { gap: 4px; }
  .header-actions a { padding: 8px 10px; }
  .header-actions .label { display: none; }
  nav.cats .container { flex-wrap: nowrap; padding-top: 8px; padding-bottom: 8px; scroll-padding: 0 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  nav.cats .container::-webkit-scrollbar { display: none; }
  nav.cats .container.at-end { -webkit-mask-image: none; mask-image: none; }
  .logo img { width: 40px; height: 40px; }
  /* 16px minimum : évite le zoom automatique de l'iPhone sur les champs */
  input, select, textarea { font-size: 16px; }
  .hero { padding: 32px 0 48px; }
  .hero p { font-size: 16px; margin-bottom: 22px; }
  .hero-actions .btn { flex: 1 1 100%; }
  section.block { padding-top: 36px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-head h2 { font-size: 22px; }
  .cat-hero h1, .prose h1 { font-size: 24px; }
  .cat-hero p { font-size: 15px; }
  .pdp h1 { font-size: 26px; }
  .buy-box .price-block .price { font-size: 28px; }
  .card { padding: 18px; }
  .trust { grid-template-columns: 1fr; margin-top: 16px; }
  .cat-tiles { grid-template-columns: 1fr; }
  .offers { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-2 > *, .grid-3 > * { grid-column: auto !important; }
  /* Tableaux : défilement horizontal plutôt que débordement de la page */
  table.list { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .segmented { display: flex; max-width: 100%; }
  .segmented label { flex: 1; text-align: center; padding: 9px 10px; }
  .tabs button { padding: 10px 14px; font-size: 14px; }
  footer.site .legal { flex-direction: column; }
  .sel-line { grid-template-columns: 1fr auto; }
  .sel-line .amounts { grid-column: 1; text-align: left; }
  .editor-line { grid-template-columns: 1fr 1fr; }
  .editor-line > :first-child { grid-column: 1 / -1; }
  footer.site .cols { grid-template-columns: 1fr; }
}
/* Petits téléphones (iPhone SE, Android compacts) */
@media (max-width: 380px) {
  .container { padding: 0 12px; }
  .logo { font-size: 18px; }
  .logo img { width: 34px; height: 34px; }
  .header-actions a { padding: 7px 8px; }
  .btn { padding: 11px 16px; }
  .offer .actions { flex-wrap: wrap; }
}
