/* ========================================================
   STV1000 - direction sobre boutique pro armurerie
   Palette anthracite + accent ocre minimal
   ======================================================== */

:root {
  --stv-bg: #ffffff;
  --stv-bg-soft: #f7f5f1;
  --stv-bg-dark: #1a1815;
  --stv-text: #1a1815;
  --stv-text-muted: #6b6863;
  --stv-text-light: #9b9892;
  --stv-border: #e8e4dc;
  --stv-border-strong: #d4cfc4;
  --stv-accent: #8b6f47;
  --stv-accent-dark: #6b5536;
  --stv-radius: 2px;
  --stv-shadow-soft: 0 1px 0 rgba(0,0,0,.04);
  --stv-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --stv-h-header: 64px;
}

/* RESET / BASELINE -------------------------------------- */
.stv1000-theme,
.stv1000-theme body,
.stv1000-theme .ast-container,
.stv1000-theme #content {
  font-family: var(--stv-font);
  color: var(--stv-text);
  background: var(--stv-bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.stv1000-theme h1, .stv1000-theme h2, .stv1000-theme h3,
.stv1000-theme h4, .stv1000-theme h5, .stv1000-theme h6 {
  font-family: var(--stv-font);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--stv-text);
}

.stv1000-theme h1 { font-size: 2rem; line-height: 1.15; }
.stv1000-theme h2 { font-size: 1.4rem; line-height: 1.2; }
.stv1000-theme h3 { font-size: 1.05rem; line-height: 1.3; }

.stv1000-theme a { color: var(--stv-text); text-decoration: none; }
.stv1000-theme a:hover { color: var(--stv-accent); }

/* Boutons globaux : sobre, plat, bordure fine */
.stv1000-theme .wp-block-button__link,
.stv1000-theme .button,
.stv1000-theme button[type="submit"],
.stv1000-theme input[type="submit"],
.stv1000-theme .ast-button {
  background: var(--stv-text);
  color: #fff;
  border: 1px solid var(--stv-text);
  border-radius: var(--stv-radius);
  padding: 10px 22px;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: none;
  transition: background .15s ease, color .15s ease;
}
.stv1000-theme .wp-block-button__link:hover,
.stv1000-theme .button:hover,
.stv1000-theme button[type="submit"]:hover {
  background: var(--stv-accent);
  border-color: var(--stv-accent);
  color: #fff;
}

.stv1000-theme .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--stv-text);
  border: 1px solid var(--stv-border-strong);
}
.stv1000-theme .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--stv-text);
  color: #fff;
  border-color: var(--stv-text);
}

/* Reset complet de la chaine de wrappers Astra :
   #content > #primary > #main > article > .entry-header + .entry-content
   On vire tous les paddings/margins/max-width pour que le contenu prenne
   toute la largeur et commence pile sous le header. */
.stv1000-theme #content,
.stv1000-theme #content > .ast-container,
.stv1000-theme #primary,
.stv1000-theme #main,
.stv1000-theme .site-main,
.stv1000-theme .content-area,
.stv1000-theme article,
.stv1000-theme .ast-article-single,
.stv1000-theme .entry-header,
.stv1000-theme .entry-content,
.stv1000-theme .ast-page-builder-template .entry-content {
  display: block;
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
}
/* Neutralise les marges top des premiers blocs de page */
.stv1000-theme article > *:first-child,
.stv1000-theme .entry-content > *:first-child,
.stv1000-theme .entry-header + .entry-content > *:first-child {
  margin-top: 0 !important;
}
.stv1000-theme .entry-header { display: none; }

/* Astra cale les blocs "alignfull" via une logique container — on force
   plein largeur pour les blocs cover hero des pages secondaires */
.stv1000-theme .entry-content > .wp-block-cover.alignfull,
.stv1000-theme .entry-content > .alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Header en position: sticky -> pas besoin de padding-top sur #content
   (le header reste dans le flow). On force juste tous les paddings/margins
   parasites a 0 avec !important. */
.stv1000-theme #content,
.stv1000-theme #primary,
.stv1000-theme #main,
.stv1000-theme .site-main,
.stv1000-theme article {
  padding: 0 !important;
  margin: 0 !important;
}
.stv1000-theme.page:not(.home) .entry-content {
  padding-bottom: 48px !important;
}

/* Cards en colonnes : forcer meme hauteur entre colonnes paralleles */
.stv1000-theme .wp-block-columns.is-layout-flex {
  align-items: stretch;
}
.stv1000-theme .wp-block-columns.is-layout-flex > .wp-block-column {
  display: flex;
  flex-direction: column;
}
.stv1000-theme .wp-block-columns.is-layout-flex > .wp-block-column > .wp-block-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}
/* CTA en bas de card aligne en pied */
.stv1000-theme .wp-block-columns.is-layout-flex > .wp-block-column > .wp-block-group > .wp-block-buttons:last-child,
.stv1000-theme .wp-block-columns.is-layout-flex > .wp-block-column > .wp-block-group > .wp-block-button:last-child {
  margin-top: auto;
}

/* HEADER ------------------------------------------------- */
.stv-header {
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid transparent;
  height: var(--stv-h-header);
  transition: border-color .2s ease, background .2s ease;
}
.stv-header.is-stuck {
  background: rgba(255,255,255,0.96);
  border-bottom-color: var(--stv-border);
}

.stv-header-inner {
  max-width: 1320px;
  height: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.stv-brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.stv-brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stv-text);
}
.stv-brand-baseline {
  font-size: 0.65rem;
  color: var(--stv-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
}

.stv-nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.stv-menu {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0; padding: 0;
  white-space: nowrap;
}
.stv-menu li { margin: 0; }
.stv-menu a {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--stv-text);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
@media (max-width: 1200px) {
  .stv-menu { gap: 16px; }
  .stv-menu a { font-size: 0.72rem; letter-spacing: 0.04em; }
}
.stv-menu a:hover,
.stv-menu .current-menu-item > a {
  color: var(--stv-text);
  border-bottom-color: var(--stv-accent);
}

.stv-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.stv-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--stv-border);
  border-radius: var(--stv-radius);
  padding: 0 4px 0 10px;
  height: 34px;
  background: #fff;
  transition: border-color .15s ease;
}
.stv-search:focus-within { border-color: var(--stv-accent); }
.stv1000-theme .stv-search input[type="search"] {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.82rem;
  width: 140px;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: var(--stv-text);
  font-family: var(--stv-font);
  height: auto !important;
  min-height: 0 !important;
}
.stv1000-theme .stv-search input[type="search"]:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}
.stv1000-theme .stv-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
.stv1000-theme .stv-search button,
.stv1000-theme .stv-search button[type="submit"] {
  background: transparent !important;
  color: var(--stv-text-muted) !important;
  border: none !important;
  padding: 6px 8px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  height: auto !important;
  font-size: inherit !important;
  cursor: pointer;
  box-shadow: none !important;
}
.stv1000-theme .stv-search button:hover {
  color: var(--stv-accent) !important;
  background: transparent !important;
}

.stv-account-link,
.stv-cart-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--stv-text);
  padding: 6px 4px;
  position: relative;
}
.stv-account-link span,
.stv-cart-link .stv-cart-count {
  font-size: 0.78rem;
}
.stv-account-link:hover,
.stv-cart-link:hover { color: var(--stv-accent); }

.stv-cart-count {
  background: var(--stv-text);
  color: #fff;
  font-size: 0.65rem;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-weight: 600;
  letter-spacing: 0;
}
.stv-cart-count[data-count="0"] { display: none; }

.stv-burger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.stv-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--stv-text);
}

/* HOME --------------------------------------------------- */
.stv-hero {
  position: relative;
  min-height: 56vh;
  display: flex;
  align-items: flex-end;
  background-color: var(--stv-bg-dark);
  background-size: cover;
  background-position: center;
  color: #fff;
  overflow: hidden;
}
.stv-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 65%, rgba(0,0,0,0.85) 100%);
}
.stv-hero-inner {
  position: relative;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 28px 36px;
}
.stv-hero-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  border-left: 2px solid var(--stv-accent);
  padding-left: 10px;
  margin-bottom: 18px;
}
.stv-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.05;
  color: #fff;
  margin: 0 0 16px;
  max-width: 720px;
  letter-spacing: -0.015em;
}
.stv-hero p {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin: 0 0 28px;
}
.stv-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.stv-btn {
  display: inline-block;
  padding: 12px 26px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: var(--stv-radius);
  border: 1px solid;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.stv-btn-primary {
  background: #fff;
  color: var(--stv-text);
  border-color: #fff;
}
.stv-btn-primary:hover {
  background: var(--stv-text);
  color: #fff;
  border-color: var(--stv-text);
}
.stv-btn-ghost {
  background: var(--stv-accent);
  color: #fff;
  border-color: var(--stv-accent);
}
.stv-btn-ghost:hover {
  background: var(--stv-text);
  color: #fff;
  border-color: var(--stv-text);
}

/* Bandeau infos discret sous hero */
.stv-bar {
  background: var(--stv-text);
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid #000;
}
.stv-bar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stv-bar-inner span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.stv-bar-inner svg { stroke: var(--stv-accent); }

/* Sections home : compactes */
.stv-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 64px 28px;
}
.stv-section-tight {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 28px;
}
.stv-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  gap: 24px;
  flex-wrap: wrap;
}
.stv-section-head h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}
.stv-section-head .stv-eyebrow {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stv-text-muted);
  margin-bottom: 6px;
}
.stv-section-head a.stv-more {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stv-text);
  border-bottom: 1px solid var(--stv-text);
  padding-bottom: 2px;
}

/* Grid catégories : tuiles serrées avec image de fond + overlay sombre */
.stv-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--stv-border);
  border: 1px solid var(--stv-border);
}
.stv-cat-grid > .stv-cat-card {
  background: var(--stv-bg-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform .3s ease;
}
/* Overlay sombre teinte anthracite, plus dense en bas pour lisibilite */
.stv-cat-grid > .stv-cat-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,24,21,0.35) 0%, rgba(26,24,21,0.78) 70%, rgba(26,24,21,0.92) 100%);
  z-index: 0;
  transition: background .3s ease;
}
/* Filtre desaturate leger pour rester dans la palette sobre */
.stv-cat-grid > .stv-cat-card.has-image {
  filter: none;
}
.stv-cat-grid > .stv-cat-card.has-image::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--stv-bg-dark);
  mix-blend-mode: saturation;
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}
.stv-cat-grid > .stv-cat-card > * {
  position: relative;
  z-index: 1;
}
.stv-cat-grid > .stv-cat-card:hover::before {
  background: linear-gradient(180deg, rgba(26,24,21,0.25) 0%, rgba(139,111,71,0.85) 100%);
}
.stv-cat-grid .stv-cat-count {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.stv-cat-grid .stv-cat-name {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.stv-cat-grid .stv-cat-arrow {
  font-size: 1.3rem;
  color: #fff;
  align-self: flex-end;
  transform: translateX(0);
  transition: transform .2s ease;
}
.stv-cat-grid > .stv-cat-card:hover .stv-cat-arrow { transform: translateX(4px); }

/* FOOTER ------------------------------------------------- */
.stv-footer {
  background: var(--stv-bg-dark);
  color: rgba(255,255,255,0.78);
  font-size: 0.85rem;
}
.stv-footer-top {
  max-width: 1320px;
  margin: 0 auto;
  padding: 56px 28px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
.stv-footer h4 {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin: 0 0 16px;
  font-weight: 500;
}
.stv-footer p, .stv-footer ul, .stv-footer li {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.8;
}
.stv-footer ul li a {
  color: rgba(255,255,255,0.78);
  border-bottom: 1px solid transparent;
}
.stv-footer ul li a:hover {
  color: #fff;
  border-bottom-color: var(--stv-accent);
}
.stv-footer-brand .stv-brand-name {
  color: #fff;
  font-size: 1.15rem;
}
.stv-footer-brand .stv-brand-baseline {
  color: rgba(255,255,255,0.55);
}
.stv-footer-brand p {
  margin-top: 14px;
  color: rgba(255,255,255,0.6);
  max-width: 320px;
  font-size: 0.82rem;
}
.stv-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 28px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
}
.stv-footer-bottom-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* WOOCOMMERCE - GRID PRODUITS DENSE -------------------- */
.stv1000-theme.woocommerce ul.products,
.stv1000-theme .woocommerce ul.products,
.stv1000-theme .wc-block-grid__products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--stv-border);
  border: 1px solid var(--stv-border);
  margin: 0;
  padding: 0;
  list-style: none;
}
.stv1000-theme.woocommerce ul.products li.product,
.stv1000-theme .wc-block-grid__product {
  background: var(--stv-bg);
  padding: 22px;
  margin: 0 !important;
  width: auto !important;
  float: none !important;
  display: flex;
  flex-direction: column;
  transition: background .2s ease;
}
.stv1000-theme.woocommerce ul.products li.product:hover,
.stv1000-theme .wc-block-grid__product:hover {
  background: var(--stv-bg-soft);
}
.stv1000-theme.woocommerce ul.products li.product img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--stv-bg);
  margin: 0 0 14px;
}
.stv1000-theme.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  color: var(--stv-text);
  padding: 0 !important;
  margin: 0 0 6px !important;
}
.stv1000-theme.woocommerce ul.products li.product .price {
  font-size: 0.9rem !important;
  color: var(--stv-text) !important;
  font-weight: 600 !important;
  margin: 0 0 10px !important;
}
.stv1000-theme.woocommerce ul.products li.product .button {
  align-self: flex-start;
  font-size: 0.7rem;
  padding: 8px 14px;
  background: transparent;
  color: var(--stv-text);
  border: 1px solid var(--stv-border-strong);
}
.stv1000-theme.woocommerce ul.products li.product .button:hover {
  background: var(--stv-text);
  color: #fff;
  border-color: var(--stv-text);
}
.stv1000-theme.woocommerce ul.products li.product .onsale {
  background: var(--stv-accent);
  color: #fff;
  border-radius: 0;
  padding: 4px 8px;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-width: 0;
  min-height: 0;
  line-height: 1;
}

/* Single product : sobre */
.stv1000-theme.single-product div.product .product_title {
  font-size: 1.6rem;
}
.stv1000-theme.single-product div.product .price {
  font-size: 1.3rem;
  color: var(--stv-text);
  font-weight: 600;
}

/* RESPONSIVE -------------------------------------------- */
@media (max-width: 1024px) {
  .stv-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .stv1000-theme.woocommerce ul.products,
  .stv1000-theme .wc-block-grid__products { grid-template-columns: repeat(3, 1fr); }
  .stv-footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  :root { --stv-h-header: 56px; }
  .stv-header-inner { padding: 0 16px; gap: 12px; }
  .stv-brand-baseline { display: none; }
  .stv-search { display: none; }
  .stv-account-link span { display: none; }
  .stv-burger { display: flex; }

  .stv-nav {
    position: fixed;
    top: var(--stv-h-header);
    left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--stv-border);
    border-bottom: 1px solid var(--stv-border);
    transform: translateY(-110%);
    transition: transform .2s ease;
    padding: 12px 20px;
    z-index: 99;
  }
  .stv-nav.is-open { transform: translateY(0); }
  .stv-menu { flex-direction: column; gap: 0; }
  .stv-menu li { border-bottom: 1px solid var(--stv-border); }
  .stv-menu li:last-child { border-bottom: none; }
  .stv-menu a { padding: 12px 0; display: block; }

  .stv-hero { min-height: 50vh; }
  .stv-section { padding: 40px 20px; }
  .stv-cat-grid { grid-template-columns: 1fr; }

  .stv1000-theme.woocommerce ul.products,
  .stv1000-theme .wc-block-grid__products { grid-template-columns: repeat(2, 1fr); }

  .stv-footer-top { grid-template-columns: 1fr; gap: 28px; padding: 40px 20px 28px; }
  .stv-footer-bottom-inner { flex-direction: column; }
}
