/*
 * Feuille de style du gabarit "Accueil Probrico" (page-templates/template-accueil.php).
 * Polices Big Shoulders + IBM Plex Sans/Mono (Google Fonts, licence SIL Open Font
 * License), auto-hébergées dans assets/fonts/ pour ne pas dépendre d'un CDN externe.
 */
@font-face {
  font-family: 'Big Shoulders';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/big-shoulders-900.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/plex-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/plex-sans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/plex-sans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/plex-mono-500.woff2') format('woff2');
}

:root {
  --brand: #1B5FA8;
  --brand-deep: #124577;
  --brand-bright: #2E7AD1;
  --safety: #F5B400;
  --safety-deep: #C98D00;
  --ground: #EAE6DC;
  --panel: #F7F5EF;
  --panel-raised: #FFFFFF;
  --ink: #171A1E;
  --ink-soft: #4B5158;
  --ink-faint: #8A8F96;
  --line: #D8D3C6;
  --line-strong: #B9B3A2;
  --on-brand: #F7F5EF;
  --shadow: 0 1px 0 rgba(23,26,30,0.04);
  --radius-plate: 4px;
  --radius-chip: 2px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #4B8FDB;
    --brand-deep: #2E6BB0;
    --brand-bright: #6DA8E8;
    --safety: #F5B400;
    --safety-deep: #D99A00;
    --ground: #0E1620;
    --panel: #141D29;
    --panel-raised: #182333;
    --ink: #F1EFE7;
    --ink-soft: #B7BEC7;
    --ink-faint: #7C8590;
    --line: #2A3644;
    --line-strong: #3C4A5A;
    --on-brand: #0E1620;
    --shadow: 0 1px 0 rgba(0,0,0,0.3);
  }
}

:root[data-theme="dark"] {
  --brand: #4B8FDB;
  --brand-deep: #2E6BB0;
  --brand-bright: #6DA8E8;
  --safety: #F5B400;
  --safety-deep: #D99A00;
  --ground: #0E1620;
  --panel: #141D29;
  --panel-raised: #182333;
  --ink: #F1EFE7;
  --ink-soft: #B7BEC7;
  --ink-faint: #7C8590;
  --line: #2A3644;
  --line-strong: #3C4A5A;
  --on-brand: #0E1620;
  --shadow: 0 1px 0 rgba(0,0,0,0.3);
}

.bic-home-canvas,
.bic-home-canvas *,
.bic-home-canvas *::before,
.bic-home-canvas *::after {
  box-sizing: border-box;
}

main.bic-home-canvas {
  display: block;
  background: var(--panel-raised);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

.bic-home-canvas a { color: inherit; }

.bic-home-canvas h1,
.bic-home-canvas h2,
.bic-home-canvas h3 { text-wrap: balance; margin: 0; }

.display {
  font-family: 'Big Shoulders', 'IBM Plex Sans', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: var(--safety);
  display: inline-block;
}

/* ---------- plate / tag component, used throughout ---------- */
.plate {
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-plate);
  position: relative;
}
.plate::before, .plate::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
  top: 8px;
}
.plate::before { left: 8px; }
.plate::after { right: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 22px;
  border-radius: 3px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- hero ---------- */
.hero {
  padding: 76px 0 64px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.96;
  margin: 18px 0 22px;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand);
  position: relative;
}
.hero-title .stamp-line {
  display: inline-block;
  opacity: 0;
  animation: title-stamp 0.5s cubic-bezier(.2,1.4,.4,1) forwards;
}
.hero-title .stamp-line.l1 { animation-delay: 0.05s; }
.hero-title .stamp-line.l2 { animation-delay: 0.2s; }
.hero-title .stamp-line.l3 { animation-delay: 0.35s; }
@keyframes title-stamp {
  0% { opacity: 0; transform: scale(0.85) rotate(-3deg) translateY(10px); }
  60% { opacity: 1; transform: scale(1.04) rotate(1deg) translateY(0); }
  80% { transform: scale(0.99) rotate(-0.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
.hero-lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 32px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-search-wrap { padding: 0 0 64px; }
.hero-search {
  display: flex;
  align-items: stretch;
  gap: 4px;
  background: var(--panel-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-plate);
  padding: 6px 6px 6px 18px;
}
.hero-search-icon {
  width: 20px;
  height: 20px;
  align-self: center;
  color: var(--ink-faint);
  flex: none;
}
.hero-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 16px 14px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16px;
  color: var(--ink);
  outline: none;
}
.hero-search-input::placeholder { color: var(--ink-faint); }
.hero-search-btn {
  flex: none;
  border: none;
  background: var(--brand);
  color: var(--on-brand);
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  padding: 0 26px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s;
}
.hero-search-btn:hover { background: var(--brand-deep); }
.hero-search-btn:focus-visible,
.hero-search-input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* hero visual: a stack of "spec plate" listing cards */
.hero-visual { position: relative; height: 420px; }
.demo-card {
  position: absolute;
  width: 300px;
  padding: 18px 20px 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.demo-card.c1 { top: 0; left: 10px; z-index: 3; transform: rotate(-2.5deg); }
.demo-card.c2 { top: 108px; right: 0; z-index: 2; transform: rotate(2deg); }
.demo-card.c3 { top: 232px; left: 40px; z-index: 1; transform: rotate(-1deg); }
.demo-card { opacity: 0; animation: card-in 0.7s cubic-bezier(.2,1,.3,1) forwards; }
.demo-card.c1 { animation-delay: 0.5s; }
.demo-card.c2 { animation-delay: 0.68s; }
.demo-card.c3 { animation-delay: 0.86s; }
.demo-card:hover {
  transform: translateY(-8px) rotate(0deg) scale(1.03);
  box-shadow: 0 16px 28px -10px rgba(0,0,0,0.22);
  z-index: 5;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) rotate(0deg) scale(0.96); }
  to { opacity: 1; }
}
.demo-card .cat {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}
.demo-card h4 {
  font-family: 'Big Shoulders', sans-serif;
  font-weight: 900;
  font-size: 21px;
  text-transform: uppercase;
  margin: 4px 0 10px;
  line-height: 1.05;
}
.demo-card .rows { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-bottom: 12px; }
.demo-card .rows div { font-size: 11.5px; }
.demo-card .rows .k { color: var(--ink-faint); font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.04em; font-size: 10px; }
.demo-card .rows .v { font-weight: 600; }
.demo-card .price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.demo-card .price .amount { font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: 16px; }
.demo-card .price .loc { font-size: 11px; color: var(--ink-faint); display: flex; align-items: center; gap: 4px; }

/* ---------- value strip ---------- */
.value-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.value-item {
  padding: 26px 24px;
  border-left: 1px solid var(--line);
}
.value-item:first-child { border-left: none; }
.value-item .num { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--safety-deep); font-weight: 500; }
.value-item h3 { font-size: 15.5px; font-weight: 600; margin: 6px 0 6px; }
.value-item p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }

/* ---------- section shell ---------- */
.bic-home-canvas > section { padding: 88px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
}
.section-head h2 { font-size: clamp(30px, 4vw, 42px); margin-top: 12px; }
.section-head .desc { max-width: 42ch; color: var(--ink-soft); font-size: 15px; margin: 12px 0 0; }

/* ---------- categories ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.cat-card {
  background: var(--panel-raised);
  padding: 26px 18px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 132px;
  justify-content: space-between;
  transition: background 0.15s;
}
.cat-card:hover { background: var(--panel); }
.cat-card .ic { width: 26px; height: 26px; color: var(--brand); }
.cat-card .ic svg { width: 100%; height: 100%; }
.cat-card span.name { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.cat-card .count { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--ink-faint); }

.cat-more { text-align: center; margin-top: 10px; }
.cat-more a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--brand);
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 45%, transparent);
  padding-bottom: 2px;
  transition: gap 0.15s, border-color 0.15s;
}
.cat-more a:hover { gap: 12px; border-color: var(--brand); }
.cat-more .arrow { transition: transform 0.15s; }

/* ---------- how it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.step {
  background: var(--panel-raised);
  padding: 32px 30px 34px;
  position: relative;
}
.step .idx {
  font-family: 'Big Shoulders', sans-serif;
  font-weight: 900;
  font-size: 58px;
  line-height: 1;
  color: var(--ground);
  -webkit-text-stroke: 1.5px var(--line-strong);
  position: absolute;
  top: 18px;
  right: 22px;
}
.step h3 { font-size: 19px; margin: 0 0 10px; max-width: 14ch; }
.step p { margin: 0; font-size: 14px; color: var(--ink-soft); max-width: 32ch; }
.step .tag {
  display: inline-block;
  margin-top: 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent);
  padding: 3px 8px;
  border-radius: 2px;
}

/* ---------- trust band ---------- */
.trust {
  background: var(--brand);
  color: var(--on-brand);
}
.trust .wrap { padding: 64px 20px; }
.trust-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}
.trust h2 { font-size: clamp(28px, 3.6vw, 38px); color: var(--on-brand); }
.trust p { color: color-mix(in srgb, var(--on-brand) 78%, transparent); font-size: 15px; max-width: 48ch; margin: 14px 0 0; }
.trust-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trust-stat { border-left: 1px solid color-mix(in srgb, var(--on-brand) 30%, transparent); padding-left: 16px; }
.trust-stat .n { font-family: 'IBM Plex Mono', monospace; font-size: 30px; font-weight: 500; color: var(--on-brand); }
.trust-stat .l { font-size: 12px; color: color-mix(in srgb, var(--on-brand) 72%, transparent); margin-top: 4px; }

/* ---------- final CTA ---------- */
.cta-final { text-align: center; }
.cta-final .eyebrow { justify-content: center; }
.cta-final h2 { font-size: clamp(34px, 5vw, 58px); margin: 16px auto 20px; max-width: 18ch; }
.cta-final .btn { margin: 0 auto; }
.cta-final .row { display: flex; justify-content: center; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 340px; margin-top: 10px; }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .value-item:nth-child(3) { border-left: none; }
  .steps { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-stats { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 600px) {
  .value-grid { grid-template-columns: 1fr; }
  .value-item { border-left: none; border-top: 1px solid var(--line); }
  .value-item:first-child { border-top: none; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-card:nth-child(9) { display: none; }
  .demo-card { width: 78vw; }
  .hero-visual { height: 460px; }
  .hero-search { flex-wrap: wrap; padding: 10px; }
  .hero-search-icon { display: none; }
  .hero-search-input { flex: 1 1 100%; padding: 10px 6px; }
  .hero-search-btn { flex: 1 1 100%; padding: 12px; }
}
