/* =====================================================================
   Thème « Industriel » — atelier sombre, acier brut, accents orange.
   Titres condensés en majuscules, tôles rivetées (dégradés CSS),
   univers en tiroirs d'établi, bandeau d'accueil en tôle larmée.
   ===================================================================== */

@font-face { font-family: "LP Ind Cond"; src: url(../../assets/fonts/cond-700.woff) format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "LP Ind Cond"; src: url(../../assets/fonts/cond-400.woff) format("woff"); font-weight: 400; font-display: swap; }

:root {
  --c-bg: #15181b;
  --c-surface: #1e2226;
  --c-surface-2: #282d32;
  --c-ink: #e9ecee;
  --c-muted: #a4adb5;
  --c-line: #343a41;
  --c-line-strong: #6b757f;
  --c-primary: #ff7a1a;
  --c-primary-hover: #ff9446;
  --c-primary-soft: #3a2616;
  --c-on-primary: #151515;
  --c-accent: #ffa31a;
  --c-on-accent: #151515;
  --c-ok: #4cc38a;
  --c-ok-soft: #173326;
  --c-warn: #f0b429;
  --c-warn-soft: #3a2e12;
  --c-alert: #ff6b5e;
  --c-alert-soft: #3d1c1a;
  --c-info: #6cb8ff;
  --c-info-soft: #16293d;
  --c-header-bg: #0e1012;
  --c-header-ink: #e9ecee;
  --c-footer-bg: #0e1012;
  --c-footer-ink: #b9c1c8;
  --c-hero-bg: #23282d;
  --c-hero-ink: #ffffff;
  --c-label-tab: #ff7a1a;
  --font-head: "LP Ind Cond", "DejaVu Sans Condensed", "Arial Narrow", sans-serif;
  --head-weight: 700;
  --head-tracking: 0.01em;
  --radius-s: 2px;
  --radius: 3px;
  --radius-l: 4px;
  --radius-btn: 2px;
  --radius-input: 2px;
  --shadow: 0 2px 0 rgba(0, 0, 0, .55), 0 10px 24px rgba(0, 0, 0, .35);
  --shadow-pop: 0 14px 40px rgba(0, 0, 0, .6);
  --focus: 0 0 0 2px #15181b, 0 0 0 4px #ffa31a;
  --rivet: #6a737c;
  color-scheme: dark;
}

/* ---------- Matières ---------- */
body[data-theme="industriel"] {
  --plate: linear-gradient(180deg, #262b30 0%, #1f2327 100%);
  --rivets:
    radial-gradient(circle at 10px 10px, var(--rivet) 0 2px, #0b0d0f 2.6px, transparent 3.4px),
    radial-gradient(circle at calc(100% - 10px) 10px, var(--rivet) 0 2px, #0b0d0f 2.6px, transparent 3.4px),
    radial-gradient(circle at 10px calc(100% - 10px), var(--rivet) 0 2px, #0b0d0f 2.6px, transparent 3.4px),
    radial-gradient(circle at calc(100% - 10px) calc(100% - 10px), var(--rivet) 0 2px, #0b0d0f 2.6px, transparent 3.4px);
  background: linear-gradient(180deg, #1b1f23 0, var(--c-bg) 520px) var(--c-bg);
}
body[data-theme="industriel"] h1,
body[data-theme="industriel"] h2,
body[data-theme="industriel"] h3 { text-transform: uppercase; }
body[data-theme="industriel"] h1 { line-height: 1.02; }
body[data-theme="industriel"] ::placeholder { color: #8c959e; opacity: 1; }
body[data-theme="industriel"] a { text-decoration-color: color-mix(in srgb, currentColor 55%, transparent); }

/* ---------- En-tête ---------- */
body[data-theme="industriel"] .site-header {
  background: linear-gradient(180deg, #16191c, #0e1012);
  border-bottom: 3px solid var(--c-primary);
}
body[data-theme="industriel"] .brand { font: 700 1.35rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .04em; }
body[data-theme="industriel"] .brand-mark {
  width: 32px; height: 30px; border-radius: 0; background: var(--c-primary);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}
body[data-theme="industriel"] .brand-mark::before { left: 9px; top: 8px; width: 14px; height: 14px; border: 3px solid #0e1012; background: #2a2f34; }
body[data-theme="industriel"] .brand-mark::after { display: none; }
body[data-theme="industriel"] .main-nav { gap: 0; margin-left: 4px; }
body[data-theme="industriel"] .main-nav a {
  font: 700 .78rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .03em;
  padding: 10px 7px; border-radius: 0; color: #d4dadf;
}
@media (max-width: 560px) { body[data-theme="industriel"] .brand { font-size: 1.15rem; letter-spacing: .02em; gap: 8px; } }
body[data-theme="industriel"] .main-nav a:hover { background: #22272c; color: #fff; }
body[data-theme="industriel"] .main-nav a[aria-current=page] { background: transparent; color: var(--c-primary); box-shadow: inset 0 -3px 0 var(--c-primary); }
body[data-theme="industriel"] .header-search .input { background: #1b1f23; border: 1px solid #3a4148; color: var(--c-ink); }
body[data-theme="industriel"] .lang-switch a { font-family: var(--font-head); opacity: .8; }
body[data-theme="industriel"] .lang-switch a[aria-current=true] { opacity: 1; background: var(--c-primary); color: var(--c-on-primary); }
body[data-theme="industriel"] .tool { border-radius: 2px; }
body[data-theme="industriel"] .mobile-nav { background: #121518; border-top: 1px solid #2a2f34; }
body[data-theme="industriel"] .mobile-nav a { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Accueil : bandeau en tôle larmée ---------- */
body[data-theme="industriel"] .hero {
  position: relative; color: #fff;
  background-color: #23282d;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .45)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .045) 0 3px, transparent 3px 16px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .28) 0 3px, transparent 3px 16px);
  border-bottom: 1px solid #000;
  padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 6vw, 84px);
}
body[data-theme="industriel"] .hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 10px;
  background: radial-gradient(circle, var(--rivet) 0 2px, #0b0d0f 2.6px, transparent 3.4px) 16px 50% / 40px 10px repeat-x;
}
body[data-theme="industriel"] .hero h1 {
  font-size: clamp(2.3rem, 1.2rem + 4.4vw, 4.4rem); letter-spacing: 0; line-height: .98; max-width: 13ch;
  text-shadow: 0 2px 0 #000;
}
body[data-theme="industriel"] .hero .lead { color: #c3cbd2; }
body[data-theme="industriel"] .counter {
  background: #0e1012; border: 2px solid var(--c-primary); border-radius: 2px;
  box-shadow: 8px 8px 0 #000;
}
body[data-theme="industriel"] .counter:focus-within { box-shadow: 8px 8px 0 #000, var(--focus); }
body[data-theme="industriel"] .counter input { color: #fff; }
body[data-theme="industriel"] .counter .ic-search { color: var(--c-primary); }
body[data-theme="industriel"] .counter .btn { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; border-radius: 0; }
body[data-theme="industriel"] .counter-examples { color: #c3cbd2; }
body[data-theme="industriel"] .counter-examples a { background: rgba(0, 0, 0, .45); border: 1px solid #4a5259; color: #fff; }
body[data-theme="industriel"] .counter-examples a:hover { background: var(--c-primary); color: var(--c-on-primary); border-color: var(--c-primary); }

body[data-theme="industriel"] .shelf,
body[data-theme="industriel"] .card,
body[data-theme="industriel"] .audience,
body[data-theme="industriel"] .order-box,
body[data-theme="industriel"] .band {
  background-color: #22272c;
  background-image: var(--rivets), var(--plate);
  border: 1px solid #3a4148; border-top-color: #4a525a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 2px 0 rgba(0, 0, 0, .5);
}
body[data-theme="industriel"] .shelf { padding: 22px; }
body[data-theme="industriel"] .shelf-head h2 { font-size: 1.05rem; letter-spacing: .06em; color: var(--c-primary); }
body[data-theme="industriel"] .shelf-head span { color: #b3bcc4; }
body[data-theme="industriel"] .binlabel { background: #15181b; border-color: #343a41; }
body[data-theme="industriel"] .binlabel:hover { border-color: var(--c-primary); }
body[data-theme="industriel"] .binlabel .bl-ref { color: #fff; }
body[data-theme="industriel"] .binlabel .bl-sub strong { color: #e9ecee; }
body[data-theme="industriel"] .pill { background: #15181b; border-color: #4a5259; color: #e9ecee; font-family: var(--font-ref); }

/* Titres de section : barre orange */
body[data-theme="industriel"] .section-head h2,
body[data-theme="industriel"] .prose h2 { display: flex; align-items: center; gap: 12px; }
body[data-theme="industriel"] .section-head h2::before,
body[data-theme="industriel"] .prose h2::before { content: ""; width: 8px; height: .9em; background: var(--c-primary); flex: none; }

/* Univers : façades de tiroirs d'établi */
body[data-theme="industriel"][data-universes=list] .universes { gap: 8px; border: 0; background: none; border-radius: 0; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
body[data-theme="industriel"][data-universes=list] .universe {
  position: relative; grid-template-columns: 34px 1fr; gap: 14px; padding: 16px 70px 16px 16px; min-height: 76px;
  background: linear-gradient(180deg, #2c3238 0%, #23282d 55%, #1f2327 100%);
  border: 1px solid #3a4148; border-top-color: #515a63; border-bottom-color: #0b0d0f; border-radius: 3px;
  font: 700 1rem/1.15 var(--font-head); text-transform: uppercase; letter-spacing: .04em; color: #eef1f3;
}
body[data-theme="industriel"][data-universes=list] .universe::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 38px; height: 10px; margin-top: -5px; border-radius: 5px;
  background: linear-gradient(180deg, #7a838c, #3e454c); box-shadow: 0 2px 0 #0b0d0f, inset 0 1px 0 rgba(255, 255, 255, .25);
}
body[data-theme="industriel"][data-universes=list] .universe:hover { border-color: var(--c-primary); color: #fff; }
body[data-theme="industriel"][data-universes=list] .universe:hover::after { background: linear-gradient(180deg, #ffa25c, #d95f0c); }
body[data-theme="industriel"] .universe .ic { color: var(--c-primary); }
body[data-theme="industriel"] .universe small { font-family: var(--font-body); text-transform: none; letter-spacing: 0; color: #b3bcc4; font-weight: 500; }

/* Deux publics */
body[data-theme="industriel"] .audience { border-radius: 4px; }
body[data-theme="industriel"] .audience--dark { background-color: #2a1c12; background-image: var(--rivets), linear-gradient(180deg, #33210f, #1f1710); border-color: #6b3a14; border-top: 4px solid var(--c-primary); color: #f1e6dc; }
body[data-theme="industriel"] .audience--dark h2 { color: #fff; }
body[data-theme="industriel"] .audience li .ic { color: var(--c-primary); }

/* Étapes : écrous hexagonaux */
body[data-theme="industriel"] .steps li::before {
  border-radius: 0; background: var(--c-primary); color: #151515; font-family: var(--font-head);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); width: 46px; height: 42px;
}
body[data-theme="industriel"] .steps h3 { font-size: 1.05rem; letter-spacing: .04em; }

body[data-theme="industriel"] .brand-cloud a { background: #1e2226; border-color: #3a4148; color: #e9ecee; border-radius: 2px; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; font-size: .92rem; }
body[data-theme="industriel"] .brand-cloud a:hover { border-color: var(--c-primary); color: #fff; }
body[data-theme="industriel"] .brand-cloud small { color: var(--c-primary); }
body[data-theme="industriel"] .trust .ic { color: var(--c-primary); }
body[data-theme="industriel"] .trust h3 { text-transform: uppercase; letter-spacing: .04em; }
body[data-theme="industriel"] .band { border-left: 6px solid var(--c-primary); }
body[data-theme="industriel"] .band p { color: #b9c1c8; }

/* ---------- Boutons et formulaires ---------- */
body[data-theme="industriel"] .btn { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; box-shadow: 0 2px 0 #000; }
body[data-theme="industriel"] .btn--ghost { box-shadow: none; }
body[data-theme="industriel"] .btn:not(.btn--primary):not(.btn--accent):not(.btn--ghost):not(.btn--danger):not(.btn--ok) { --b-bg: #2a2f34; --b-line: #4a5259; }
body[data-theme="industriel"] .btn:not(.btn--primary):not(.btn--accent):not(.btn--ghost):not(.btn--danger):not(.btn--ok):hover { --b-bg: #343a41; }
body[data-theme="industriel"] .btn--ok { --b-ink: #08140d; }
body[data-theme="industriel"] .input,
body[data-theme="industriel"] .field input:not([type=checkbox]):not([type=radio]):not([type=file]),
body[data-theme="industriel"] .field select,
body[data-theme="industriel"] .field textarea { background: #121518; border-color: #5a636c; }
body[data-theme="industriel"] .field > label,
body[data-theme="industriel"] .label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: .84rem; color: #cfd6dc; }
body[data-theme="industriel"] .qty { background: #121518; border-color: #5a636c; }
body[data-theme="industriel"] .field .qty { justify-self: start; }
body[data-theme="industriel"] .field .qty input[type=number] { width: 56px; min-height: 40px; height: 40px; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; text-align: center; }
body[data-theme="industriel"] .check--strong { background: #2a2214; }

/* ---------- Recherche et résultats ---------- */
body[data-theme="industriel"] .page-head .counter { box-shadow: 6px 6px 0 #000; }
body[data-theme="industriel"] .facets > div { background: #1a1e22; border: 1px solid #2c3238; padding: 12px; border-radius: 3px; }
body[data-theme="industriel"] .facets .field { background: none; border: 0; padding: 0; }
body[data-theme="industriel"] .facets h3 { font-size: .82rem; letter-spacing: .08em; color: var(--c-primary); }
body[data-theme="industriel"] .facet-list a { color: #d4dadf; }
body[data-theme="industriel"] .facet-list a:hover { background: #282d32; }
body[data-theme="industriel"] .facet-list a[aria-current=true] { background: var(--c-primary); color: #151515; }
body[data-theme="industriel"] .result { background: linear-gradient(180deg, #23282d, #1e2226); border-color: #343a41; border-top-color: #424a52; }
body[data-theme="industriel"] .result::before { box-shadow: inset -2px 0 0 rgba(0, 0, 0, .35); }
body[data-theme="industriel"] .result .r-ref { color: #fff; }
body[data-theme="industriel"] .result .r-ref:hover { color: var(--c-primary); }
body[data-theme="industriel"] .result .r-brand { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; color: var(--c-primary); font-size: .9rem; }
body[data-theme="industriel"] .result .r-des { color: #c3cbd2; }
body[data-theme="industriel"] .pager a, body[data-theme="industriel"] .pager span { border-radius: 2px; background: #1e2226; }
body[data-theme="industriel"] .pager .is-current { background: var(--c-primary); color: #151515; border-color: var(--c-primary); }
body[data-theme="industriel"] .tabs a[aria-current=page], body[data-theme="industriel"] .tabs .is-active { color: #fff; border-bottom-color: var(--c-primary); }
body[data-theme="industriel"] .tabs a, body[data-theme="industriel"] .tabs button { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }

/* ---------- Fiche pièce ---------- */
body[data-theme="industriel"] .part-head .brandline { color: var(--c-primary); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em; }
body[data-theme="industriel"] .part-head h1 { color: #fff; text-transform: none; text-shadow: 0 2px 0 #000; }
body[data-theme="industriel"] .order-box { border: 2px solid var(--c-primary); box-shadow: 8px 8px 0 #000; border-radius: 3px; padding: 26px; }
body[data-theme="industriel"] .countries li { background: #262b30; border: 1px solid #3a4148; }
body[data-theme="industriel"] .countries .code { background: var(--c-primary); color: #151515; }
body[data-theme="industriel"] .spec dt { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; }

/* ---------- Tableaux, alertes, badges (mode sombre) ---------- */
body[data-theme="industriel"] .table-wrap { background: #1e2226; }
body[data-theme="industriel"] .table th { background: #262b30; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; color: #c3cbd2; }
body[data-theme="industriel"] .alert--info { color: var(--c-ink); border-color: color-mix(in srgb, var(--c-info) 45%, transparent); }
body[data-theme="industriel"] .alert--success { color: var(--c-ink); border-color: color-mix(in srgb, var(--c-ok) 45%, transparent); }
body[data-theme="industriel"] .alert--warning { color: var(--c-ink); border-color: color-mix(in srgb, var(--c-warn) 45%, transparent); }
body[data-theme="industriel"] .alert--error { color: var(--c-ink); border-color: color-mix(in srgb, var(--c-alert) 45%, transparent); }
body[data-theme="industriel"] .alert--info > .ic { color: var(--c-info); }
body[data-theme="industriel"] .alert--success > .ic { color: var(--c-ok); }
body[data-theme="industriel"] .alert--warning > .ic { color: var(--c-warn); }
body[data-theme="industriel"] .alert--error > .ic { color: var(--c-alert); }
body[data-theme="industriel"] .badge--done { background: var(--c-ok-soft); color: var(--c-ok); }
body[data-theme="industriel"] .suggest { background: #1b1f23; border-color: #4a5259; }
body[data-theme="industriel"] .suggest a { color: var(--c-ink); }
body[data-theme="industriel"] .suggest .s-ref mark { background: var(--c-accent); color: var(--c-on-accent); }
body[data-theme="industriel"] .toast { background: #2a2f34; color: var(--c-ink); border: 1px solid #4a5259; border-left: 4px solid var(--c-primary); }
body[data-theme="industriel"] .toast a { color: var(--c-primary); }
body[data-theme="industriel"] .install-banner { background: #2a2f34; color: var(--c-ink); }
body[data-theme="industriel"] dialog.modal::backdrop { background: rgba(0, 0, 0, .72); }
body[data-theme="industriel"] .error-page .code { color: var(--c-primary); font-family: var(--font-head); text-shadow: 0 3px 0 #000; }

/* ---------- Espace membre ---------- */
body[data-theme="industriel"] .side { background: #121518; border-right: 1px solid #2a2f34; }
body[data-theme="industriel"] .side-nav a { color: #d4dadf; border-radius: 0; border-left: 3px solid transparent; }
body[data-theme="industriel"] .side-nav a:hover { background: #1e2226; }
body[data-theme="industriel"] .side-nav a[aria-current=page] { background: #22272c; color: #fff; border-left-color: var(--c-primary); }
body[data-theme="industriel"] .side-nav a[aria-current=page] .count { background: var(--c-primary); color: #151515; }
body[data-theme="industriel"] .content-head h1 { letter-spacing: .02em; }
body[data-theme="industriel"] .kpi { background: #1e2226; }

/* ---------- Pied de page ---------- */
body[data-theme="industriel"] .site-footer { position: relative; border-top: 1px solid #2a2f34; }
body[data-theme="industriel"] .site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 10px;
  background: radial-gradient(circle, var(--rivet) 0 2px, #000 2.6px, transparent 3.4px) 16px 50% / 40px 10px repeat-x;
}
body[data-theme="industriel"] .footer-brand { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; }
body[data-theme="industriel"] .footer-grid h3 { color: var(--c-primary); text-transform: uppercase; letter-spacing: .08em; font-size: .88rem; }
body[data-theme="industriel"] .site-footer a:hover { color: var(--c-primary); }

/* ---------- Navigation repliée sur écran moyen (menu dans un tiroir) ---------- */
body[data-theme="industriel"] .header-search { min-width: 120px; }
@media (min-width: 981px) and (max-width: 1240px) {
  body[data-theme="industriel"] .main-nav, body[data-theme="industriel"] .lang-switch, body[data-theme="industriel"] .header-search { display: none; }
  body[data-theme="industriel"] .nav-toggle { display: inline-grid; }
  body[data-theme="industriel"] .header-tools { margin-left: auto; }
  body[data-theme="industriel"] .mobile-nav { position: fixed; top: var(--header-h); right: 0; bottom: 0; left: auto; width: min(420px, 100%); z-index: 49; padding: 16px 24px 40px; overflow-y: auto; background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow-pop); }
  body[data-theme="industriel"] .mobile-nav.is-open { display: block; }
  body[data-theme="industriel"] .mobile-nav a { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: var(--border); color: inherit; text-decoration: none; font-weight: 600; font-size: 1.05rem; }
  body[data-theme="industriel"] .mobile-nav .lang-row { display: flex; gap: 8px; margin-top: 18px; }
  body[data-theme="industriel"] .mobile-nav .lang-row a { border: var(--border); border-radius: var(--radius); padding: 8px 14px; font-size: .95rem; }
}

/* ---------- Focus clavier toujours visible (même sur les éléments décorés d'une ombre) ---------- */
body[data-theme="industriel"] :is(a, button, summary, [tabindex]):focus-visible { box-shadow: var(--focus) !important; }
body[data-theme="industriel"] .counter input:focus-visible { box-shadow: none !important; }
