/*
Theme Name: HaveMark
Description: Thème custom WooCommerce pour HaveMark — vente de matériel de motoculture au Danemark.
Author: Prichrist
Version: 1.1
Text Domain: havemark
*/

:root {
  --forest:       #1D3A2F;
  --forest-mid:   #2D5C47;
  --forest-light: #4A8C6A;
  --sage:         #E8F0EB;
  --cream:        #F7F5F0;
  --white:        #FFFFFF;
  --ink:          #151C18;
  --muted:        #6B7A70;
  --sun:          #F5C842;
  --sun-dark:     #D4A82E;
  --border:       #DCE5DF;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Inter', sans-serif;
  --radius:       4px;
  --wrap:         1240px;
  --shadow:       0 2px 12px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--forest);
  margin: 0 0 0.5em;
  line-height: 1.05;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--forest-mid); text-decoration: none; transition: color .15s; }
a:hover { color: var(--forest); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 6px; }

.hm-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---- SVG Icon system ---- */
.hm-icon { display: inline-block; vertical-align: middle; fill: currentColor; }

/* ---- Buttons ---- */
.hm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--forest);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1rem;
  padding: 14px 28px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.hm-btn:hover { background: var(--forest-mid); color: var(--white); transform: translateY(-1px); }
.hm-btn--sun { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.hm-btn--sun:hover { background: var(--sun-dark); color: var(--ink); border-color: var(--sun-dark); }
.hm-btn--outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.hm-btn--outline:hover { background: var(--white); color: var(--forest); border-color: var(--white); }

/* ---- Topbar ---- */
.hm-topbar {
  background: var(--forest);
  color: rgba(255,255,255,0.8);
  font-size: 0.82rem;
  padding: 9px 0;
  text-align: center;
  letter-spacing: 0.02em;
}
.hm-topbar a { color: var(--sun); }
.hm-topbar-inner { display: flex; justify-content: center; align-items: center; gap: 24px; flex-wrap: wrap; }
.hm-topbar-item { display: flex; align-items: center; gap: 6px; }

/* ---- Header ---- */
.hm-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow);
}
.hm-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}
.hm-logo {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--forest);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.hm-logo span { color: var(--sun-dark); }

/* Search */
.hm-search { flex: 1; max-width: 440px; }
.hm-search form {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s;
}
.hm-search form:focus-within { border-color: var(--forest-light); }
.hm-search input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--cream);
  color: var(--ink);
}
.hm-search button[type="submit"] {
  background: var(--forest);
  color: var(--white);
  border: none;
  padding: 9px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.hm-search button[type="submit"]:hover { background: var(--forest-mid); }

/* Nav */
.hm-nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.hm-nav a {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-weight: 600;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .15s, color .15s;
}
.hm-nav a:hover, .hm-nav .current-menu-item > a { color: var(--forest); border-bottom-color: var(--sun); }

/* Cart */
.hm-cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sun);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  padding: 10px 16px;
  border-radius: var(--radius);
  flex-shrink: 0;
  white-space: nowrap;
}
.hm-cart-btn:hover { background: var(--sun-dark); color: var(--ink); }
.hm-cart-count {
  background: var(--forest);
  color: var(--white);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ---- Hero ---- */
.hm-hero {
  background: var(--forest);
  color: var(--white);
  padding: 80px 0 70px;
  position: relative;
  overflow: hidden;
}
.hm-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hm-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; position: relative; }
.hm-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,200,66,0.12);
  border: 1px solid var(--sun);
  color: var(--sun);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.hm-hero h1 { color: var(--white); margin-bottom: 16px; }
.hm-hero p.lead { font-size: 1.1rem; color: rgba(255,255,255,0.72); max-width: 460px; margin-bottom: 28px; }
.hm-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hm-hero-img img { width: 100%; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.hm-hero-stats {
  display: flex;
  gap: 30px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.hm-hero-stat .num { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--sun); display: block; }
.hm-hero-stat .lbl { font-size: 0.8rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---- Trust band ---- */
.hm-trust {
  background: var(--sage);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}
.hm-trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.hm-trust-item { display: flex; align-items: center; gap: 14px; }
.hm-trust-icon {
  width: 42px;
  height: 42px;
  background: var(--forest);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white);
}
.hm-trust-item strong { display: block; font-family: var(--font-display); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--forest); }
.hm-trust-item span { font-size: 0.8rem; color: var(--muted); }

/* ---- Categories ---- */
.hm-cats { padding: 60px 0; background: var(--cream); }
.hm-section-title { text-align: center; margin-bottom: 36px; }
.hm-section-title h2 { margin-bottom: 8px; }
.hm-section-title p { color: var(--muted); font-size: 1rem; margin: 0; }
.hm-cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.hm-cat-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 14px;
  text-align: center;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  color: var(--ink);
}
.hm-cat-card:hover { border-color: var(--forest-light); box-shadow: var(--shadow); transform: translateY(-3px); color: var(--forest); }
.hm-cat-icon { width: 36px; height: 36px; margin: 0 auto 10px; color: var(--forest-mid); }
.hm-cat-card .name { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.04em; display: block; }
.hm-cat-card .count { font-size: 0.75rem; color: var(--muted); margin-top: 4px; display: block; }

/* ---- Products ---- */
.hm-products { padding: 70px 0; }
.hm-section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; }
.hm-section-head a { font-family: var(--font-display); text-transform: uppercase; font-size: 0.88rem; color: var(--forest-mid); letter-spacing: 0.04em; }
.hm-section-head a:hover { color: var(--sun-dark); }

ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 18px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
ul.products li.product {
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius) !important;
  background: var(--white) !important;
  overflow: hidden !important;
  transition: box-shadow .15s, transform .15s !important;
  padding: 0 0 16px !important;
}
ul.products li.product:hover { box-shadow: var(--shadow) !important; transform: translateY(-2px) !important; }
ul.products li.product a img { width: 100% !important; height: 200px !important; object-fit: cover !important; border-bottom: 1px solid var(--border) !important; margin-bottom: 12px !important; }
ul.products li.product .woocommerce-loop-product__title {
  font-size: 0.92rem !important; font-family: var(--font-body) !important;
  text-transform: none !important; letter-spacing: 0 !important;
  font-weight: 600 !important; padding: 0 14px !important; color: var(--ink) !important;
}
ul.products li.product .price { padding: 4px 14px !important; font-family: var(--font-display) !important; font-size: 1.2rem !important; font-weight: 700 !important; color: var(--forest) !important; }
ul.products li.product .button {
  margin: 10px 14px 0 !important;
  display: block !important;
  background: var(--forest) !important;
  color: var(--white) !important;
  font-family: var(--font-display) !important;
  text-transform: uppercase !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.04em !important;
  padding: 10px 14px !important;
  border-radius: var(--radius) !important;
  text-align: center !important;
  transition: background .15s !important;
  border: none !important;
}
ul.products li.product .button:hover { background: var(--sun) !important; color: var(--ink) !important; }
ul.products li.product .onsale { background: var(--sun) !important; color: var(--ink) !important; font-family: var(--font-display) !important; font-weight: 700 !important; border-radius: var(--radius) !important; }

/* ---- Footer ---- */
.hm-footer { background: var(--forest); color: rgba(255,255,255,0.65); padding: 60px 0 28px; font-size: 0.88rem; }
.hm-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.hm-footer h4 { color: var(--white); font-size: 0.85rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.hm-footer ul { list-style: none; padding: 0; margin: 0; }
.hm-footer ul li { margin-bottom: 8px; }
.hm-footer a { color: rgba(255,255,255,0.6); transition: color .15s; }
.hm-footer a:hover { color: var(--sun); }
.hm-footer-logo { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--white); text-transform: uppercase; margin-bottom: 12px; display: block; }
.hm-footer-logo span { color: var(--sun); }
.hm-footer-contact { font-size: 0.85rem; color: rgba(255,255,255,0.5); line-height: 1.8; }
.hm-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}
.hm-footer-bottom a { color: rgba(255,255,255,0.35); }
.hm-footer-bottom a:hover { color: var(--sun); }

/* ---- Single product ---- */
.hm-product-wrap { padding: 40px 0 70px; }
.woocommerce-breadcrumb { font-size: 0.82rem; color: var(--muted); padding: 16px 0; }
.woocommerce-breadcrumb a { color: var(--muted); }
.single-product .product_title { font-family: var(--font-display) !important; color: var(--forest) !important; text-transform: uppercase !important; }
.single-product .price { font-family: var(--font-display) !important; font-size: 2rem !important; color: var(--forest) !important; font-weight: 700 !important; }
.single-product .single_add_to_cart_button {
  background: var(--sun) !important; color: var(--ink) !important;
  font-family: var(--font-display) !important; text-transform: uppercase !important;
  font-weight: 700 !important; letter-spacing: 0.05em !important;
  border-radius: var(--radius) !important; padding: 16px 32px !important;
  font-size: 1.05rem !important; border: none !important; transition: background .15s !important;
}
.single-product .single_add_to_cart_button:hover { background: var(--sun-dark) !important; }

/* ---- Pages légales ---- */
.hm-legal { padding: 60px 0; max-width: 820px; margin: 0 auto; }
.hm-legal h1 { margin-bottom: 24px; }
.hm-legal h2 { font-size: 1.2rem; margin-top: 32px; margin-bottom: 10px; }
.hm-legal p, .hm-legal li { font-size: 0.95rem; color: #333; }
.hm-legal table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.hm-legal table th, .hm-legal table td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; font-size: 0.9rem; }
.hm-legal table th { background: var(--sage); font-family: var(--font-display); text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.04em; }

/* ---- Breadcrumb ---- */
.hm-breadcrumb { padding: 14px 0; font-size: 0.82rem; color: var(--muted); }
.hm-breadcrumb a { color: var(--muted); }
.hm-breadcrumb a:hover { color: var(--forest); }
.hm-breadcrumb span { color: var(--ink); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hm-cat-grid { grid-template-columns: repeat(3, 1fr); }
  ul.products { grid-template-columns: repeat(3, 1fr) !important; }
  .hm-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hm-hero-grid { grid-template-columns: 1fr; }
  .hm-hero-img { display: none; }
  .hm-cat-grid { grid-template-columns: repeat(2, 1fr); }
  ul.products { grid-template-columns: repeat(2, 1fr) !important; }
  .hm-trust-grid { grid-template-columns: repeat(2, 1fr); }
  .hm-nav { display: none; }
  .hm-search { display: none; }
  .hm-footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  ul.products { grid-template-columns: 1fr !important; }
  .hm-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hm-trust-grid { grid-template-columns: 1fr; }
}
a:focus-visible, button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
