/* ============================================================
   DBV PROTECT — Styles globaux
   Police : Marianne (avec fallback système robuste)
   ============================================================ */

/* ── MARIANNE FONT FACE ── */
@font-face {
  font-family: 'Marianne';
  src: url('../fonts/Marianne-Thin.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Marianne';
  src: url('../fonts/Marianne-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Marianne';
  src: url('../fonts/Marianne-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Marianne-Italic non disponible — le navigateur génère l'italique synthétique */
@font-face {
  font-family: 'Marianne';
  src: url('../fonts/Marianne-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Marianne';
  src: url('../fonts/Marianne-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Marianne-Bold_Italic non disponible — italique synthétique utilisé */
@font-face {
  font-family: 'Marianne';
  src: url('../fonts/Marianne-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --vert: #96c93e;
  --vert-dark: #7aaa2e;
  --vert-texte: #4e7a15;
  --gris: #474747;
  --orange: #E67E22;
  --texte: #1a1a2e;
  --border: #e8e8e8;
  --font: 'Marianne', 'Inter', system-ui, -apple-system, Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--texte); display: flex; flex-direction: column; min-height: 100vh; }
#site-footer { margin-top: auto; }

/* ── TICKER BAR ── */
.ticker-bar {
  background: #1e1e1e;
  overflow: hidden;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  user-select: none;
}
.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}
.ticker-bar:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 40px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.ticker-item svg { flex-shrink: 0; opacity: 0.85; }
.ticker-sep {
  color: rgba(255,255,255,0.2);
  font-size: 14px;
  align-self: center;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* HEADER */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.header-top { display: grid; grid-template-columns: 138px 1fr 138px; align-items: center; padding: 12px 60px; }
.logo-center { grid-column: 2; justify-self: center; }
.header-social-left { grid-column: 1; }
.header-social-right { grid-column: 3; display: grid; grid-template-columns: repeat(3, 46px); align-items: center; justify-content: end; }
.logo { display: flex; flex-direction: column; align-items: center; text-decoration: none; }
.logo-text { font-size: 26px; font-weight: 900; color: var(--gris); letter-spacing: 2px; }
.logo-text span { color: var(--vert); }
.logo-tagline { font-size: 11px; color: #999; font-style: italic; }
.header-social { display: flex; gap: 14px; align-items: center; }
.header-social a { color: var(--gris); font-size: 18px; text-decoration: none; transition: color 0.2s; }
.header-social a:hover { color: var(--vert); }

/* NAV DESKTOP */
.site-nav { display: grid; grid-template-columns: 138px 1fr 138px; align-items: center; padding: 0 60px 10px; border-top: 1px solid #f5f5f5; position: relative; }
.site-nav > .nav-center { display: flex; align-items: center; justify-content: center; gap: 4px; }
.nav-right-tools { display: grid; grid-template-columns: repeat(3, 46px); align-items: center; justify-content: end; }
.nav-tool-icon { display: flex; align-items: center; justify-content: center; color: var(--gris); text-decoration: none; transition: color 0.2s; }
.header-social-right a { display: flex; align-items: center; justify-content: center; }
.nav-tool-icon:hover { color: var(--vert); }
.nav-link { font-size: 13px; font-weight: 600; color: var(--texte); text-decoration: none; text-transform: uppercase; letter-spacing: 1px; padding: 10px 16px; position: relative; transition: color 0.2s; }
.nav-link::after { content: ''; position: absolute; bottom: 4px; left: 16px; right: 16px; height: 2px; background: var(--vert); transform: scaleX(0); transition: transform 0.25s; }
.nav-link:hover, .nav-link.active { color: var(--vert); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

/* CART ICON */
.cart-icon-link { position:relative; display:flex; align-items:center; color:var(--gris); text-decoration:none; transition:color 0.2s; }
.cart-icon-link:hover { color:var(--vert); }
.cart-icon-link svg { display:block; }
.cart-badge { position:absolute; top:-8px; right:-8px; background:#e74c3c; color:#fff; font-size:9px; font-weight:700; width:17px; height:17px; border-radius:50%; display:flex; align-items:center; justify-content:center; border:2px solid #fff; }
.cart-icon-mobile { display:none; }

/* ── BARRE DE RECHERCHE ── */
.search-trigger { background:none; border:1.5px solid var(--border); border-radius:30px; display:flex; align-items:center; gap:8px; padding:7px 16px; cursor:pointer; color:var(--gris); font-size:13px; font-family:var(--font); transition:all 0.2s; white-space:nowrap; max-height:38px; }
.search-trigger:hover { border-color:var(--vert); color:var(--vert); }

/* DROPDOWN NAV */
.nav-dropdown { position: static; }
.nav-dropdown-toggle { font-size: 13px; font-weight: 600; color: var(--texte); text-transform: uppercase; letter-spacing: 1px; padding: 10px 16px; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: color 0.2s; position: relative; }
.nav-dropdown-toggle::after { content: ''; position: absolute; bottom: 4px; left: 16px; right: 16px; height: 2px; background: var(--vert); transform: scaleX(0); transition: transform 0.25s; }
.nav-dropdown:hover .nav-dropdown-toggle { color: var(--vert); }
.nav-dropdown:hover .nav-dropdown-toggle::after { transform: scaleX(1); }
.nav-arrow { font-size: 10px; transition: transform 0.2s; display: inline-block; }
.nav-dropdown:hover .nav-arrow { transform: rotate(180deg); }
.mega-menu { display: none; position: fixed; top: 0; left: 0; right: 0; background: #fff; border-top: 3px solid var(--vert); border-bottom: 1px solid var(--border); box-shadow: 0 12px 40px rgba(0,0,0,0.12); z-index: 500; }
.nav-dropdown:hover .mega-menu, .nav-dropdown.mega-open .mega-menu { display: flex; }
.mega-menu-inner { display: flex; width: 100%; max-width: 1200px; margin: 0 auto; min-height: 280px; }
.mega-simple-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px; width: 100%; max-width: 1200px; margin: 0 auto; padding: 16px; }
.mega-simple-item { display: flex; align-items: center; padding: 11px 18px; font-size: 14px; font-weight: 600; color: var(--texte); text-decoration: none; border-radius: 8px; transition: background 0.15s, color 0.15s; }
.mega-simple-item:hover { background: rgba(150,201,62,0.12); color: var(--vert-dark,#5a8a1a); }
.mega-cats { width: 240px; flex-shrink: 0; background: #f7f7f7; border-right: 1px solid var(--border); padding: 12px 0; }
.mega-cat-item { display: flex; align-items: center; justify-content: space-between; padding: 11px 20px; font-size: 13px; font-weight: 600; color: var(--texte); text-decoration: none; cursor: pointer; transition: all 0.15s; border-left: 3px solid transparent; }
.mega-cat-item:hover, .mega-cat-item.active { background: #fff; color: var(--vert); border-left-color: var(--vert); }
.mega-cat-item .cat-arrow { font-size: 9px; color: #bbb; transition: color 0.15s; }
.mega-cat-item:hover .cat-arrow, .mega-cat-item.active .cat-arrow { color: var(--vert); }
.mega-sub { flex: 1; padding: 24px 36px; display: none; }
.mega-sub.active { display: block; }
.mega-sub-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #bbb; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.mega-sub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 16px; }
.mega-sub-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 13px; color: var(--texte); text-decoration: none; border-radius: 6px; transition: all 0.15s; }
.mega-sub-item:hover { background: #f5fce8; color: var(--vert); }
.mega-sub-item::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--border); flex-shrink: 0; transition: background 0.15s; }
.mega-sub-item:hover::before { background: var(--vert); }
.mega-sub-voir { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; font-size: 12px; font-weight: 700; color: var(--vert); text-decoration: none; border: 1.5px solid var(--vert); padding: 7px 16px; border-radius: 20px; transition: all 0.2s; }
.mega-sub-voir:hover { background: var(--vert); color: #fff; }
.mega-sub-empty { color: #aaa; font-size: 13px; padding: 8px 0; }


/* ── MENU HAMBURGER MOBILE ── */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--gris);
  transition: color 0.2s;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
.hamburger-btn:hover { color: var(--vert); }
.hamburger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE NAV DRAWER */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  pointer-events: none;
}
.mobile-nav.open { pointer-events: auto; }
.mobile-nav-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s ease;
}
.mobile-nav.open .mobile-nav-overlay { background: rgba(0,0,0,0.5); }
.mobile-nav-drawer {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 300px; max-width: 85vw;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-nav.open .mobile-nav-drawer { transform: translateX(0); }
.mobile-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mobile-nav-header img { height: 50px; width: auto; }
.mobile-nav-close {
  background: none; border: 1.5px solid var(--border); border-radius: 8px;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #888; font-size: 18px; transition: all 0.2s;
}
.mobile-nav-close:hover { border-color: #aaa; color: #333; }
.mobile-nav-body { flex: 1; padding: 12px 0; }
.mobile-nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  font-size: 14px; font-weight: 600;
  color: var(--texte);
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mobile-nav-item:hover { background: #f5fce8; color: var(--vert); }
.mobile-nav-item .mn-arrow { font-size: 10px; color: #bbb; transition: transform 0.2s; }
.mobile-nav-item.open .mn-arrow { transform: rotate(90deg); }
.mobile-nav-submenu {
  display: none;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}
.mobile-nav-submenu.open { display: block; }
.mobile-nav-sub-item {
  display: block;
  padding: 11px 24px 11px 40px;
  font-size: 13px; color: #555;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s, color 0.15s;
}
.mobile-nav-sub-item:hover { background: #f0f9e8; color: var(--vert); }
.mobile-nav-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
  flex-shrink: 0;
}
.mobile-nav-social { display: flex; gap: 14px; }
.mobile-nav-social a { color: var(--gris); transition: color 0.2s; }
.mobile-nav-social a:hover { color: var(--vert); }

/* FOOTER */
.site-footer { background: var(--gris); color: #ccc; padding: 50px 60px 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-desc { font-size: 13px; color: #888; line-height: 1.6; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: #888; text-decoration: none; margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: var(--vert); }
.footer-bottom { border-top: 1px solid #555; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #666; }
.footer-bottom a { color: #666; text-decoration: none; }
.footer-bottom a:hover { color: var(--vert); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 30px; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; border: none; transition: all 0.2s; font-family: var(--font); }
.btn-primary { background: var(--vert); color: #fff; }
.btn-primary:hover { background: var(--vert-dark); }
.btn-outline { background: transparent; color: var(--gris); border: 2px solid var(--gris); }
.btn-outline:hover { background: var(--gris); color: #fff; }
.btn-white { background: #fff; color: var(--gris); }
.btn-white:hover { background: #f0f0f0; }

/* PAGE HERO */
.page-hero { background: var(--gris); padding: 50px 60px; text-align: center; }
.page-hero h1 { color: #fff; font-size: 32px; font-weight: 900; letter-spacing: 2px; }
.page-hero p { color: #aaa; font-size: 15px; margin-top: 10px; }

/* SECTION TITLE */
.section-title { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 40px; }
.section-title::before, .section-title::after { content: ''; display: block; width: 60px; height: 2px; background: var(--gris); }
.section-title h2 { font-size: 24px; font-weight: 700; color: var(--gris); white-space: nowrap; }
.section-title-white::before, .section-title-white::after { background: #fff; }
.section-title-white h2 { color: #fff; }

/* ── BANDEAU RGPD COOKIES ── */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #1a1a2e;
  color: #fff;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 99999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  font-family: var(--font);
  font-size: 13px;
  transform: translateY(0);
  transition: transform 0.4s ease;
}
#cookie-banner.hidden { transform: translateY(110%); }
#cookie-banner p { flex: 1; line-height: 1.5; color: #ccc; margin: 0; }
#cookie-banner a { color: var(--vert); }
.cookie-btns { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn-accept {
  background: var(--vert); color: #fff; border: none;
  padding: 9px 22px; border-radius: 20px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: var(--font); transition: background 0.2s;
}
.cookie-btn-accept:hover { background: var(--vert-dark); }
.cookie-btn-refuse {
  background: transparent; color: #aaa; border: 1px solid #555;
  padding: 9px 22px; border-radius: 20px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: all 0.2s;
}
.cookie-btn-refuse:hover { border-color: #aaa; color: #fff; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .header-top { padding: 10px 30px; }
  .site-nav { padding: 0 30px 8px; }
}

@media (max-width: 768px) {
  /* ── Header ── */
  .hamburger-btn { display: flex; }
  .mobile-nav { display: block; }
  .site-nav { display: none; }
  .header-top { padding: 10px 12px; grid-template-columns: 44px 44px 1fr auto; gap: 4px; }
  .header-social { display: none; }
  .header-social-right { display: flex; gap: 8px; }
  .header-social-right img { width: 26px !important; height: 26px !important; }
  .header-social-right .cart-icon-link svg { width: 22px; height: 22px; }
  .logo-center img { height: 60px !important; }
  .cart-icon-mobile { display:flex; align-items:center; justify-content:center; color:var(--gris); text-decoration:none; width:44px; }

  /* ── Footer ── */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .site-footer { padding: 40px 20px 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  /* ── Page hero ── */
  .page-hero { padding: 30px 16px; }
  .page-hero h1 { font-size: 22px; letter-spacing: 1px; }
  .page-hero p { font-size: 13px; }

  /* ── Section title ── */
  .section-title { gap: 10px; margin-bottom: 24px; }
  .section-title::before, .section-title::after { width: 30px; }
  .section-title h2 { font-size: 19px; }

  /* ── Boutons ── */
  .btn { padding: 11px 20px; font-size: 13px; }
  .hero-btns { flex-direction: column; align-items: center; }
  .hero-btns a { width: 100%; max-width: 280px; justify-content: center; }

  /* ── Badges hero ── */
  .hero-badges { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .hero-badge { font-size: 12px; }

  /* ── EPI ── */
  .epi-grid { gap: 12px; }
  .epi-item { width: 110px; }
  .epi-circle { width: 90px; height: 90px; }
  .epi-circle img { width: 70px; height: 70px; }

  /* ── Marquage ── */
  .marquage-section { padding: 32px 16px; }
  .marquage-grid { grid-template-columns: 1fr !important; gap: 14px; }

  /* ── Secteurs ── */
  .secteurs-section { padding: 32px 16px; }
  .secteurs-grid { grid-template-columns: repeat(2,1fr) !important; }

  /* ── Contact / Formulaire ── */
  .contact-wrap { flex-direction: column; padding: 20px 16px; gap: 20px; }
  .contact-info { max-width: 100%; min-width: unset; }
  .f-row { flex-direction: column; }
  .f-row .f-group { flex: unset; }

  /* ── Cookie banner ── */
  #cookie-banner { flex-direction: column; align-items: flex-start; padding: 14px 16px; gap: 12px; }
  .cookie-btns { width: 100%; }
  .cookie-btn-accept, .cookie-btn-refuse { flex: 1; text-align: center; }
}

@media (max-width: 400px) {
  .logo-center img { height: 55px !important; }
  .hero-slogan-img { max-width: 280px; }
  .secteurs-grid { grid-template-columns: 1fr !important; }
  .hero-badge { gap: 6px; }
  .hero-badge-icon { width: 32px; height: 32px; font-size: 15px; }
}

@media (max-width: 480px) {
  .header-top { grid-template-columns: 40px 1fr auto; gap: 6px; }
  .header-social-right { gap: 6px; }
  .header-social-right img { width: 22px !important; height: 22px !important; }
  .logo-center img { height: 52px !important; }
  .hero-btns a { max-width: 100%; }
}

/* ── ACCESSIBILITÉ ── */
:focus-visible {
  outline: 2px solid var(--vert);
  outline-offset: 2px;
  border-radius: 2px;
}
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--vert);
  outline-offset: 3px;
}

/* ── SCROLL ── */
html {
  scroll-behavior: smooth;
}

/* ── SELECTION ── */
::selection {
  background: rgba(150, 201, 62, 0.25);
  color: var(--texte);
}

/* ── IMAGES ── */
img {
  max-width: 100%;
  height: auto;
}

/* ── PRINT ── */
@media print {
  .site-header, .site-footer, #cookie-banner, .mobile-nav { display: none !important; }
  body { font-size: 12pt; }
}

/* ── TABLET 992px ── */
@media (max-width: 992px) {
  .mega-sub-grid { grid-template-columns: repeat(2, 1fr); }
}
