/* France Insectes — refonte du header thème enfant PS8 */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap');

:root {
  --fi-green: #00a161;
  --fi-green-dark: #008852;
  --fi-text: #333333;
  --fi-text-light: #666666;
  --fi-heading: #555555;
  --fi-border: #e5e5e5;
  --fi-bg-light: #f7f7f7;
  --fi-bg-footer: #fbfbfb;
}

body {
  font-family: 'Raleway', 'Open Sans', Arial, Helvetica, sans-serif;
  color: var(--fi-text);
  background: #ffffff;
  font-size: 14px;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--fi-heading);
  font-weight: 700;
}

a { color: #444; transition: color .2s; }
a:hover, a:focus { color: var(--fi-green); text-decoration: none; }

/* ===== TOP BAR (style source) ===== */
#top_bar {
  background: #000000;
  color: #ffffff;
  font-size: 12px;
  padding: 0;
  border-bottom: none;
}
.fi-top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
}
.fi-top-bar-left,
.fi-top-bar-right,
.fi-top-bar-center {
  display: flex;
  align-items: center;
  gap: 14px;
}
.fi-top-bar-center {
  flex: 1;
  justify-content: center;
  padding: 0 15px;
}
.fi-top-item,
.fi-top-link {
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}
.fi-top-link:hover,
.fi-top-link:focus {
  color: #cccccc;
  text-decoration: none;
}
.fi-top-lang .fi-flag {
  margin-right: 4px;
  vertical-align: middle;
}
.fi-top-currency {
  font-weight: 600;
}
.fi-welcome {
  font-size: 12px;
  color: #ffffff;
}
.fi-top-help {
  position: relative;
  cursor: pointer;
}
.fi-top-help .caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  vertical-align: middle;
  border-top: 4px solid #ffffff;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}
.fi-top-help .fi-top-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  min-width: 160px;
  padding: 5px 0;
  margin: 4px 0 0;
  font-size: 12px;
  text-align: left;
  background-color: #fff;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 0;
  box-shadow: 0 6px 12px rgba(0,0,0,.175);
}
.fi-top-help:hover .fi-top-dropdown,
.fi-top-help:focus-within .fi-top-dropdown {
  display: block;
}
.fi-top-dropdown > li {
  list-style: none;
}
.fi-top-dropdown > li > a {
  display: block;
  padding: 6px 14px;
  clear: both;
  color: #333;
  white-space: nowrap;
}
.fi-top-dropdown > li > a:hover {
  color: var(--fi-green);
  background: #f7f7f7;
}

#header { background: #ffffff; border-bottom: 1px solid var(--fi-border); }

/* Masquer la nav classique pour éviter double affichage */
.header-nav { display: none !important; }

/* ===== DESKTOP MAIN HEADER ===== */
.header-top { padding: 0; background: #ffffff; }

.fi-header-main {
  padding: 18px 0;
  background: #ffffff;
}
.fi-header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.fi-header-logo {
  flex: 0 0 auto;
  max-width: 360px;
}
.fi-header-logo img.logo,
.fi-header-logo .logo {
  max-width: 100%;
  height: auto;
  display: block;
}
.fi-header-tools {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1 1 auto;
  justify-content: flex-end;
}
.fi-header-search {
  flex: 0 1 460px;
  width: 100%;
  max-width: 460px;
}
.fi-header-search #search_widget {
  width: 100%;
}
.fi-header-search form {
  width: 100%;
}
.fi-header-search input[type="text"],
.fi-header-search input[type="search"] {
  width: 100%;
  border-radius: 20px;
  padding: 10px 44px 10px 18px;
  border: 1px solid var(--fi-border);
  background: #fff;
  font-size: 14px;
}
.fi-header-search button,
.fi-header-search .search_button {
  background: none;
  border: none;
  color: #444;
}
.fi-header-search button:hover,
.fi-header-search .search_button:hover {
  color: var(--fi-green);
}
.fi-header-cart {
  flex: 0 0 auto;
}
.fi-header-cart .blockcart {
  padding: 0;
}
.fi-header-cart .shopping-cart {
  color: var(--fi-text);
  font-size: 14px;
  font-weight: 600;
}
.fi-header-cart .cart-products-count {
  background: var(--fi-green);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  display: inline-block;
  margin-right: 4px;
}

/* ===== MOBILE HEADER ===== */
.fi-mobile-header {
  padding: 10px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--fi-border);
}
.fi-mobile-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
}
.fi-mobile-left,
.fi-mobile-right,
.fi-mobile-user {
  flex: 0 0 auto;
}
.fi-mobile-center {
  flex: 1 1 auto;
  text-align: center;
}
.fi-mobile-center img.logo {
  max-height: 48px;
  width: auto;
  max-width: 160px;
}
.fi-mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: #444;
  padding: 6px;
}
.fi-mobile-menu-toggle:hover { color: var(--fi-green); }
.fi-mobile-menu-toggle i {
  font-size: 24px;
}
.fi-mobile-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  margin-top: 2px;
  line-height: 1;
}

/* ===== OVERRIDE CLASSIC DEFAULTS ===== */
.logo { max-width: 260px; }
#header .header-top .container { padding-top: 0; padding-bottom: 0; }
#_desktop_logo h1 { margin: 0; line-height: 1; }

/* Menu */
#_desktop_top_menu .top-menu a[data-depth="0"] {
  color: var(--fi-text);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: .03em;
  padding: 14px 16px;
  border-bottom: 3px solid transparent;
}
#_desktop_top_menu .top-menu a[data-depth="0"]:hover {
  color: var(--fi-green);
  border-bottom-color: var(--fi-green);
}

/* Product prices */
.product-price, .current-price, .price, .product-prices .current-price { color: var(--fi-green) !important; font-weight: 700; }
.price-regular, .regular-price { color: #999; }

/* Buttons */
.btn-primary,
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
  background-color: var(--fi-green) !important;
  border-color: var(--fi-green) !important;
}
.btn-primary:hover,
.btn-primary:not(:disabled):not(.disabled):active:hover {
  background-color: var(--fi-green-dark) !important;
  border-color: var(--fi-green-dark) !important;
}

.btn-outline-primary {
  color: var(--fi-green);
  border-color: var(--fi-green);
}
.btn-outline-primary:hover {
  background-color: var(--fi-green);
  border-color: var(--fi-green);
  color: #fff;
}

/* Footer */
#footer { margin-top: 2rem; color: var(--fi-text-light); }
.footer-before { background: var(--fi-bg-light); padding: 1.2rem 0; border-top: 1px solid var(--fi-border); }
.footer-container { background: var(--fi-bg-footer); border-top: 1px solid var(--fi-border); padding-top: 2rem; }
#footer h3, #footer h4, #footer .block-title {
  color: var(--fi-heading);
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--fi-border);
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.footer-bottom {
  border-top: 1px solid var(--fi-border);
  padding: 14px 0;
  margin-top: 20px;
  font-size: 12px;
}

/* Product cards — list styling aligned with source shop.france-insectes.com */
.product-miniature .product-title a { color: var(--fi-text); font-weight: 600; }
.product-miniature .product-title a:hover { color: var(--fi-green); }
.product-miniature .product-price-and-shipping { color: var(--fi-green); font-weight: 700; }
.product-miniature .thumbnail-container { border: 1px solid var(--fi-border); border-radius: 0; background: #fff; }
.product-miniature .thumbnail-container:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }

/* Reduce miniature thumbnail size */
#products .product-miniature .thumbnail-top img,
.featured-products .product-miniature .thumbnail-top img,
.product-miniature .thumbnail-top img {
  max-height: 230px;
  width: auto;
  margin: 0 auto;
}
#products .product-miniature .thumbnail-top,
.featured-products .product-miniature .thumbnail-top,
.product-miniature .thumbnail-top {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hide intrusive quick-view icon and wishlist button on listings */
.product-miniature .quick-view,
.product-miniature .highlighted-informations .quick-view,
.product-miniature .wishlist-button,
.product-miniature .wishlist-button-product,
.product-miniature .favorite_border,
.product-miniature button[class*="wishlist"],
.product-miniature button[class*="favorite"],
#products .wishlist-button,
.featured-products .wishlist-button {
  display: none !important;
}
/* Ensure product thumbnails don't overflow */
#products .product-miniature .product-thumbnail,
.featured-products .product-miniature .product-thumbnail,
.product-miniature .product-thumbnail {
  display: block;
  overflow: hidden;
}

/* Tighter product grid on home */
.featured-products .products {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.featured-products .products .product-thumbnail img {
  margin: 0 auto;
  width: auto;
  max-height: 220px;
}

/* Category page content width */
#left-column, #right-column { display: none; }
#center_column { width: 100%; }

/* Faceted search only visible when JS is enabled */
#search_filters_wrapper { margin-bottom: 1.5rem; }
#search_filters .facet { margin-bottom: .8rem; }
#search_filters .facet-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--fi-heading);
}
#search_filters .custom-checkbox,
#search_filters .custom-radio { margin-right: 6px; }

/* Pagination */
.pagination .page-item.active .page-link {
  background-color: var(--fi-green);
  border-color: var(--fi-green);
  color: #fff;
}
.pagination .page-link { color: var(--fi-green); }

/* Alerts */
.alert-success { background-color: #e6f7ef; border-color: var(--fi-green); color: #0f5b3c; }
.alert-danger { background-color: #fbe9e9; border-color: #dc3545; color: #721c24; }

/* Inputs focus */
.form-control:focus {
  border-color: var(--fi-green);
  box-shadow: 0 0 0 .2rem rgba(0, 161, 97, .25);
}

/* Links in primary color */
.form-control-label,
.nav-link.active,
.dropdown-item:active,
.page-link:hover { color: var(--fi-green); }

/* Cart page tweaks */
.cart-preview .cart-products-count { background: var(--fi-green); color: #fff; }

/* Checkout */
#checkout .checkout-step.-current + .step-title { color: var(--fi-green); }
#checkout .step-number { background: var(--fi-green); }

/* CMS pages */
.cms-content h1, .cms-content h2, .cms-content h3 {
  color: var(--fi-heading);
  margin-bottom: 1rem;
}
.cms-content p { margin-bottom: 1rem; }

/* Better breadcrumb */
.breadcrumb {
  background: transparent;
  padding: .75rem 0;
  font-size: 13px;
}
.breadcrumb a { color: var(--fi-text-light); }
.breadcrumb a:hover { color: var(--fi-green); }
.breadcrumb-item.active { color: var(--fi-heading); }

/* Top menu full-width background */
#_desktop_top_menu {
  background: #fff;
  border-top: 1px solid var(--fi-border);
  border-bottom: 2px solid var(--fi-green);
}

/* Custom France Insectes menu block from module */
#fi-desktop-menu {
  background: #ffffff;
  border-bottom: 2px solid var(--fi-green);
  border-top: 1px solid var(--fi-border);
}
#fi-desktop-menu .menu--primary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
#fi-desktop-menu .menu--primary > li > a {
  display: block;
  padding: 14px 16px;
  color: var(--fi-text);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  border-bottom: 3px solid transparent;
}
#fi-desktop-menu .menu--primary > li > a:hover,
#fi-desktop-menu .menu--primary > li > a:focus {
  color: var(--fi-green);
  border-bottom-color: var(--fi-green);
  text-decoration: none;
}

/* Source-style badges like "NEW" in menu */
#fi-desktop-menu .menu--primary .is-open .megamenu-list,
#fi-desktop-menu .menu--primary .is-open .submenu {
  display: block;
}

/* Hide default classic top menu to avoid duplication */
#_desktop_top_menu .top-menu { display: none; }

/* Mobile top menu wrapper */
#mobile_top_menu_wrapper {
  background: #fff;
  border-bottom: 2px solid var(--fi-green);
  padding: 10px 15px;
}
#mobile_top_menu_wrapper .top-menu a[data-depth="0"] {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--fi-border);
  color: var(--fi-text);
  font-weight: 600;
  text-transform: uppercase;
}

/* Newsletter */
.newsletter-form .input-wrapper input {
  border-radius: 20px 0 0 20px;
  border: 1px solid var(--fi-border);
}
.newsletter-form .btn {
  border-radius: 0 20px 20px 0;
  text-transform: uppercase;
  font-weight: 600;
}

/* Scrollbar and small polish */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 991px) {
  .fi-header-logo { max-width: 240px; }
  .fi-header-search { flex-basis: 340px; max-width: 340px; }
  .fi-header-main-inner { gap: 20px; }
}

@media (max-width: 767px) {
  #top_bar { display: none !important; }
  .fi-mobile-header { display: block !important; }
  .fi-header-main { display: none !important; }
  .fi-mobile-center img.logo { max-height: 42px; }
}
