/*
Theme Name: DMH Motoculture
Author: DMH Motoculture
Description: Th&egrave;me vitrine pour DMH Motoculture
Version: 3.0
Text Domain: dmh-motoculture
*/

/* ── VARIABLES ── */
:root {
  --dmh-red: #C0392B;
  --dmh-red-dark: #96281B;
  --dmh-red-light: #fdf0ee;
  --dmh-black: #1a1a1a;
  --dmh-gray: #f7f7f7;
  --dmh-gray-mid: #e2e2e2;
  --dmh-text: #2d2d2d;
  --dmh-text-muted: #6b6b6b;
  --dmh-white: #ffffff;
  --dmh-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --dmh-radius: 10px;
  --dmh-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --dmh-shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --dmh-shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --dmh-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --dmh-max-w: 1200px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--dmh-font);
  color: var(--dmh-text);
  background: var(--dmh-gray);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--dmh-red); text-decoration: none; transition: color var(--dmh-transition); }
a:hover { color: var(--dmh-red-dark); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── HEADER ── */
#dmh-header {
  background: var(--dmh-white);
  border-bottom: 3px solid var(--dmh-red);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--dmh-shadow-md);
}
.dmh-header-inner {
  max-width: var(--dmh-max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  gap: 20px;
}
.dmh-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  min-width: 180px;
  padding: 6px 0;
}
.dmh-logo:hover { text-decoration: none; }
.dmh-logo-icon-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dmh-logo-icon {
  display: block;
}
.dmh-logo-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--dmh-red);
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.dmh-logo-sub {
  font-size: 10px;
  color: var(--dmh-text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}
.dmh-header-contact {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--dmh-text-muted);
  gap: 4px;
}
.dmh-header-contact span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dmh-header-contact a {
  color: var(--dmh-text-muted);
  font-weight: 500;
}
.dmh-header-contact a:hover {
  color: var(--dmh-red);
}
.dmh-header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Liens navigation */
.dmh-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dmh-text);
  text-decoration: none;
  border: 1.5px solid var(--dmh-gray-mid);
  border-radius: var(--dmh-radius);
  background: var(--dmh-white);
  transition: all var(--dmh-transition);
  white-space: nowrap;
}
.dmh-nav-link:hover {
  color: var(--dmh-red);
  background: var(--dmh-red-light);
  border-color: var(--dmh-red);
  text-decoration: none;
}
.dmh-nav-link svg { color: var(--dmh-red); }

/* Dropdown menu */
.dmh-dropdown { position: relative; }
.dmh-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1.5px solid var(--dmh-gray-mid);
  border-radius: var(--dmh-radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--dmh-text);
  cursor: pointer;
  background: var(--dmh-white);
  transition: all var(--dmh-transition);
  font-family: var(--dmh-font);
}
.dmh-dropdown-toggle:hover {
  background: var(--dmh-gray);
  border-color: #ccc;
}
.dmh-dropdown-toggle .arrow { transition: transform 0.2s; }
.dmh-dropdown.open .dmh-dropdown-toggle .arrow { transform: rotate(180deg); }
.dmh-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--dmh-white);
  border: 1px solid var(--dmh-gray-mid);
  border-radius: var(--dmh-radius);
  overflow: hidden;
  z-index: 9999;
  box-shadow: var(--dmh-shadow-lg);
}
.dmh-dropdown.open .dmh-dropdown-menu { display: block; }
.dmh-dropdown-menu a {
  display: block;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dmh-text);
  border-bottom: 1px solid var(--dmh-gray);
  transition: all 0.15s;
  text-decoration: none;
}
.dmh-dropdown-menu a:last-child { border-bottom: none; }
.dmh-dropdown-menu a:hover {
  background: var(--dmh-red-light);
  color: var(--dmh-red);
  padding-left: 22px;
  text-decoration: none;
}

/* Barre de recherche */
.dmh-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--dmh-gray);
  border: 1.5px solid var(--dmh-gray-mid);
  border-radius: var(--dmh-radius);
  padding: 7px 14px;
  transition: border-color var(--dmh-transition);
}
.dmh-search-form:focus-within {
  border-color: var(--dmh-red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}
.dmh-search-form input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--dmh-text);
  width: 150px;
  font-family: var(--dmh-font);
}
.dmh-search-form input::placeholder { color: #aaa; }
.dmh-search-form button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

/* ── MAIN ── */
#dmh-main { min-height: 60vh; }
.dmh-container { max-width: var(--dmh-max-w); margin: 0 auto; padding: 40px 24px; }

/* ── HERO ── */
.dmh-hero {
  background: linear-gradient(135deg, var(--dmh-black) 0%, #2c2c2c 100%);
  padding: 56px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.dmh-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(192,57,43,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.dmh-hero h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--dmh-white);
  margin-bottom: 10px;
  position: relative;
  letter-spacing: -0.5px;
}
.dmh-hero h1 span { color: var(--dmh-red); }
.dmh-hero p {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}
.dmh-hero-badges {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 28px;
  position: relative;
}
.dmh-hero-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  font-weight: 500;
}
.dmh-hero-badge svg {
  opacity: 0.6;
}

/* ── SECTION TITRE ── */
.dmh-section-title {
  max-width: var(--dmh-max-w);
  margin: 40px auto 0;
  padding: 0 24px;
}
.dmh-section-title h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--dmh-black);
  border-left: 4px solid var(--dmh-red);
  padding-left: 14px;
  letter-spacing: -0.3px;
}

/* ── GRILLE ── */
.dmh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 20px 24px;
  max-width: var(--dmh-max-w);
  margin: 0 auto;
}

/* Page d'accueil : grille auto-fill pour les marques */
.dmh-front .dmh-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Pages internes : 2 colonnes pour les tuiles produits */
.dmh-grid.dmh-grid-2col {
  grid-template-columns: repeat(2, 1fr);
}

/* ── CARTE ── */
.dmh-card {
  background: var(--dmh-white);
  border: 1px solid var(--dmh-gray-mid);
  border-radius: 12px;
  overflow: hidden;
  display: block;
  text-decoration: none;
  transition: all var(--dmh-transition);
  box-shadow: var(--dmh-shadow-sm);
}
.dmh-card:hover {
  border-color: var(--dmh-red);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(192,57,43,0.12);
  text-decoration: none;
}
.dmh-card-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--dmh-gray);
}
.dmh-card-img img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  object-position: center;
  padding: 16px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.dmh-card:hover .dmh-card-img img { transform: scale(1.06); }
.dmh-card-img.placeholder {
  flex-direction: column;
  gap: 8px;
  background: var(--dmh-gray);
}
.dmh-card-img.placeholder svg { opacity: 0.3; }
.dmh-card-img.placeholder span { font-size: 11px; color: #bbb; }
.dmh-card-body { padding: 16px 18px; }
.dmh-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dmh-text);
  margin-bottom: 4px;
}
.dmh-card-desc {
  font-size: 13px;
  color: var(--dmh-text-muted);
  line-height: 1.5;
}
.dmh-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--dmh-red);
  font-weight: 700;
  transition: gap var(--dmh-transition);
}
.dmh-card:hover .dmh-card-link {
  gap: 8px;
}

/* Carte service (sans image) */
.dmh-card-service { padding: 28px 20px; }
.dmh-card-service .dmh-service-icon {
  width: 48px;
  height: 48px;
  background: var(--dmh-red-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  transition: background var(--dmh-transition);
}
.dmh-card:hover .dmh-service-icon {
  background: var(--dmh-red);
}
.dmh-card:hover .dmh-service-icon svg {
  stroke: var(--dmh-white);
}
.dmh-card-service .dmh-card-title { font-size: 17px; }

/* ── PAGES INTERNES ── */
.dmh-page-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--dmh-black);
  margin-bottom: 6px;
  border-left: 4px solid var(--dmh-red);
  padding-left: 16px;
  letter-spacing: -0.3px;
}
.dmh-page-subtitle {
  font-size: 14px;
  color: var(--dmh-text-muted);
  margin-bottom: 28px;
  padding-left: 20px;
}
.dmh-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--dmh-black);
  margin: 28px 0 12px;
}
.dmh-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--dmh-red);
  margin: 20px 0 8px;
}
.dmh-content p { margin-bottom: 14px; line-height: 1.8; }
.dmh-content ul { padding-left: 20px; margin-bottom: 14px; }
.dmh-content ul li { margin-bottom: 6px; }

/* ── FOOTER ── */
#dmh-footer {
  background: var(--dmh-black);
  color: rgba(255,255,255,0.7);
  margin-top: 64px;
  position: relative;
}
#dmh-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--dmh-red);
}
.dmh-footer-inner {
  max-width: var(--dmh-max-w);
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.dmh-footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--dmh-white);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.dmh-footer-col p,
.dmh-footer-col a {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.9;
  display: block;
  text-decoration: none;
  transition: color var(--dmh-transition);
}
.dmh-footer-col a:hover { color: var(--dmh-red); text-decoration: none; }
.dmh-footer-col .dmh-footer-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  margin-top: 12px;
}
.dmh-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 16px 24px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  max-width: var(--dmh-max-w);
  margin: 0 auto;
}

/* ── WIDGETS TUILES ── */
.dmh-grid .dmh-widget-tuile { display: contents; }
.dmh-grid-widgets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 20px 24px 32px;
  max-width: var(--dmh-max-w);
  margin: 0 auto;
}
.dmh-grid-widgets .dmh-widget-tuile { display: block; }

/* ── WOOCOMMERCE ── */
.dmh-woo-desc {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e8e8e8;
}
.dmh-woo-desc p {
  display: block !important;
  margin-bottom: 12px !important;
  line-height: 1.8 !important;
  color: var(--dmh-text) !important;
  font-size: 14px !important;
}
.dmh-woo-desc br {
  display: block !important;
  content: "" !important;
  margin-top: 8px !important;
}
.dmh-woo-contact {
  margin-top: 28px;
  padding: 20px;
  background: var(--dmh-gray);
  border-radius: 12px;
  border-left: 3px solid var(--dmh-red);
}
.dmh-woo-contact p {
  font-size: 14px;
  color: var(--dmh-text-muted);
  margin-bottom: 14px;
}
.dmh-woo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--dmh-red);
  color: var(--dmh-white);
  border-radius: var(--dmh-radius);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--dmh-transition);
}
.dmh-woo-btn:hover {
  background: var(--dmh-red-dark);
  color: var(--dmh-white);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(192,57,43,0.3);
}

/* Page produit */
.dmh-woo-product { max-width: 1100px; margin: 0 auto; }
.dmh-woo-top {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 40px;
}
.dmh-woo-image img {
  max-width: 350px !important;
  max-height: 300px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  border-radius: 12px !important;
  border: 1px solid var(--dmh-gray-mid) !important;
  background: var(--dmh-white) !important;
  padding: 12px !important;
}
.dmh-woo-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--dmh-black);
  border-left: 4px solid var(--dmh-red);
  padding-left: 16px;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}
.dmh-woo-cat, .dmh-woo-sku {
  font-size: 13px;
  color: var(--dmh-text-muted);
  margin-bottom: 8px;
}
.dmh-woo-cat strong, .dmh-woo-sku strong { color: var(--dmh-text); }
.dmh-woo-no-image {
  width: 100%;
  height: 280px;
  background: var(--dmh-gray);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Archive produit - carte image */
.dmh-archive-card-img {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--dmh-white);
  border-bottom: 1px solid var(--dmh-gray);
}
.dmh-archive-card-img img {
  max-width: 100%;
  max-height: 168px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.dmh-archive-no-img {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dmh-gray);
}

/* Search card image */
.dmh-search-card-img {
  background: var(--dmh-gray);
}
.dmh-search-card-img img {
  max-width: 100%;
  max-height: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  padding: 8px;
}

/* ── SOCIAL LINK (footer) ── */
.dmh-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-top: 14px;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  transition: all var(--dmh-transition);
}
.dmh-social-link:hover {
  color: var(--dmh-white);
  background: #1877F2;
  border-color: #1877F2;
}

/* ── FACEBOOK HEADER ── */
.dmh-header-fb {
  display: inline-flex;
  align-items: center;
  color: var(--dmh-text-muted);
  transition: color var(--dmh-transition);
}
.dmh-header-fb:hover { color: #1877F2; }

/* ── BACK TO TOP ── */
#dmh-back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--dmh-red);
  color: var(--dmh-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--dmh-transition);
  box-shadow: 0 4px 12px rgba(192,57,43,0.3);
  z-index: 999;
}
#dmh-back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#dmh-back-top:hover {
  background: var(--dmh-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(192,57,43,0.4);
}

/* ── FOOTER BOTTOM LINK ── */
.dmh-footer-bottom a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color var(--dmh-transition);
}
.dmh-footer-bottom a:hover { color: rgba(255,255,255,0.6); }

/* ── HAMBURGER ── */
.dmh-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--dmh-gray-mid);
  border-radius: var(--dmh-radius);
  background: var(--dmh-white);
  cursor: pointer;
  padding: 8px;
}
.dmh-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--dmh-text);
  border-radius: 2px;
  transition: all 0.3s;
}
.dmh-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.dmh-hamburger.open span:nth-child(2) { opacity: 0; }
.dmh-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 404 PAGE ── */
.dmh-404 {
  text-align: center;
  padding: 80px 24px;
}
.dmh-404 h1 {
  font-size: 72px;
  font-weight: 800;
  color: var(--dmh-red);
  margin-bottom: 8px;
}
.dmh-404 h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dmh-black);
  margin-bottom: 16px;
}
.dmh-404 p {
  font-size: 15px;
  color: var(--dmh-text-muted);
  margin-bottom: 32px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.dmh-404 .dmh-woo-btn {
  display: inline-flex;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .dmh-footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .dmh-header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 14px 16px;
    gap: 10px;
  }
  .dmh-header-contact { display: none; }
  .dmh-hamburger { display: flex; }
  .dmh-header-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--dmh-gray-mid);
  }
  .dmh-header-nav.open { display: flex; }
  .dmh-header-nav .dmh-nav-link,
  .dmh-header-nav .dmh-dropdown-toggle {
    width: 100%;
    justify-content: flex-start;
  }
  .dmh-header-nav .dmh-dropdown { width: 100%; }
  .dmh-header-nav .dmh-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 16px;
  }
  .dmh-search-form { width: 100%; }
  .dmh-search-form input { width: 100%; }
  .dmh-hero { padding: 36px 16px 28px; }
  .dmh-hero h1 { font-size: 24px; }
  .dmh-hero-badges { gap: 20px; }
  .dmh-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    padding: 16px;
  }
  .dmh-woo-top { grid-template-columns: 1fr; gap: 24px; }
  .dmh-footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 600px) {
  .dmh-grid.dmh-grid-2col { grid-template-columns: 1fr; }
  .dmh-grid-widgets { grid-template-columns: 1fr; }
}
