/* ============================================================================
   5426 STUDIO — CHARTE GRAPHIQUE GLOBALE (#f4f2ee BLANC CASSE & MODE SOMBRE #151515)
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Alegreya:wght@500;600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --sf3d-header-h: 130px;
  --sf3d-bg: #f4f2ee;
  --sf3d-surface: #ffffff;
  --sf3d-ink: #151515;
  --sf3d-muted: #5f5b55;
  --sf3d-border: rgba(21, 21, 21, 0.14);
  --bs-primary: #151515 !important;
  --bs-primary-rgb: 21, 21, 21 !important;
  --bs-link-color: #151515 !important;
  --bs-link-hover-color: #555555 !important;
  --bs-border-radius: 0px !important;
  --bs-border-radius-sm: 0px !important;
  --bs-border-radius-lg: 0px !important;
}

html.sf3d-dark,
body.sf3d-dark {
  --sf3d-bg: #151515;
  --sf3d-surface: #1f1f1f;
  --sf3d-ink: #f4f2ee;
  --sf3d-muted: #b0aba3;
  --sf3d-border: rgba(244, 242, 238, 0.18);
  --bs-primary: #f4f2ee !important;
  --bs-link-color: #f4f2ee !important;
  background: #151515 !important;
  color: #f4f2ee !important;
}

/* 0. UNIFORMISATION GLOBALE DES POLICES (SANS CASSER MATERIAL ICONS) */
body,
p,
a,
li,
input,
select,
textarea,
button,
.btn,
.form-control,
.dropdown-item,
.header-nav,
.header-top {
  font-family: 'Source Sans 3', 'Open Sans', Arial, sans-serif !important;
}

.material-icons,
i.material-icons {
  font-family: 'Material Icons' !important;
  font-style: normal !important;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4,
.product__name,
.page-title,
.section-title,
.card-title,
.accordion-button {
  font-family: 'Alegreya', Georgia, serif !important;
  color: var(--sf3d-ink) !important;
}

body,
#wrapper,
#header,
.header-nav,
.header-top {
  background-color: var(--sf3d-bg) !important;
  color: var(--sf3d-ink) !important;
}

html.sf3d-dark #header,
html.sf3d-dark .header-nav,
html.sf3d-dark .header-top,
html.sf3d-dark .form-control,
html.sf3d-dark .search-widget input {
  background-color: #151515 !important;
  color: #f4f2ee !important;
  border-color: rgba(244, 242, 238, 0.22) !important;
}

html.sf3d-dark #header a,
html.sf3d-dark #header span,
html.sf3d-dark #header i,
html.sf3d-dark #header svg,
html.sf3d-dark .header-block__icon {
  color: #f4f2ee !important;
}

html.sf3d-dark #header img.logo,
html.sf3d-dark .header-top__logo img,
html.sf3d-dark #_desktop_logo img,
html.sf3d-dark #_mobile_logo img {
  filter: invert(1) brightness(1.15) !important;
}

html.sf3d-dark .search-widget input::placeholder {
  color: rgba(244, 242, 238, 0.55) !important;
}

html.sf3d-dark .search-widget button,
html.sf3d-dark .search-widget button i,
html.sf3d-dark .search-widget button svg {
  color: #f4f2ee !important;
}

html.sf3d-dark .header-block__badge,
html.sf3d-dark #header .header-block__badge,
html.sf3d-dark #header .header-block__badge span,
html.sf3d-dark #header .cart-products-count,
.header-block__badge {
  background: var(--sf3d-ink) !important;
  color: var(--sf3d-bg) !important;
}

html.sf3d-dark #header .header-block__badge,
html.sf3d-dark #header .header-block__badge span,
html.sf3d-dark #header .cart-products-count {
  background: #f4f2ee !important;
  color: #151515 !important;
}

.sf3d-nav-ig-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: var(--sf3d-ink) !important;
  text-decoration: none !important;
  padding: 4px 6px;
  margin-left: 4px;
  vertical-align: middle;
  opacity: 0.85;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.sf3d-nav-ig-link:hover {
  opacity: 1;
  transform: scale(1.08);
}

/* Bouton bascule Mode Sombre / Clair dans le bandeau #header */
.sf3d-header-theme-btn {
  background: transparent;
  border: 1px solid var(--sf3d-border);
  color: var(--sf3d-ink);
  border-radius: 0px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 10px;
  transition: all 0.15s ease;
}

.sf3d-header-theme-btn:hover {
  background: var(--sf3d-ink);
  color: var(--sf3d-bg);
  border-color: var(--sf3d-ink);
}

/* Sélecteur de langue Français / Anglais compact et aligné */
#_desktop_language_selector,
#_mobile_language_selector {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

#_desktop_language_selector .language-selector-wrapper,
#_desktop_language_selector .language-selector {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 4px !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  white-space: nowrap !important;
}

#_desktop_language_selector button,
#_desktop_language_selector select,
#_desktop_language_selector .btn-unstyle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--sf3d-ink) !important;
  border: 1px solid var(--sf3d-border) !important;
  border-radius: 0px !important;
  padding: 4px 10px !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  width: auto !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

#_desktop_language_selector select option {
  background: var(--sf3d-bg);
  color: var(--sf3d-ink);
}

#_desktop_language_selector .expand-more,
#_desktop_language_selector .material-icons {
  display: none !important;
}

#_desktop_language_selector .dropdown-menu {
  background: var(--sf3d-bg) !important;
  color: var(--sf3d-ink) !important;
  border: 1px solid var(--sf3d-border) !important;
  border-radius: 0px !important;
  box-shadow: none !important;
  min-width: 110px !important;
}

#_desktop_language_selector .dropdown-menu a {
  color: var(--sf3d-ink) !important;
  font-size: 12px !important;
  padding: 6px 12px !important;
}

#_desktop_language_selector .dropdown-menu a:hover {
  background: var(--sf3d-ink) !important;
  color: var(--sf3d-bg) !important;
}

/* Boutons & Badges PrestaShop -> Rectangle Noir #151515 (ou inverse #f4f2ee en Dark Mode) */
.btn-primary,
.product__add-to-cart-button,
.cart-detailed-actions .btn-primary,
#submit-login,
.form-footer .btn-primary {
  background: var(--sf3d-ink) !important;
  background-color: var(--sf3d-ink) !important;
  border: 1px solid var(--sf3d-ink) !important;
  border-radius: 0px !important;
  color: var(--sf3d-bg) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transition: background 0.15s ease, color 0.15s ease !important;
}

.btn-primary:hover,
.btn-primary:focus,
.product__add-to-cart-button:hover {
  background: var(--sf3d-bg) !important;
  background-color: var(--sf3d-bg) !important;
  color: var(--sf3d-ink) !important;
  border-color: var(--sf3d-ink) !important;
}

.btn-secondary,
.btn-tertiary,
.btn-outline-primary,
.quantity-button__group .btn,
.quantity-button__group .form-control {
  border-radius: 0px !important;
  border-color: var(--sf3d-border) !important;
  color: var(--sf3d-ink) !important;
  box-shadow: none !important;
}

.header-block__badge {
  background: var(--sf3d-ink) !important;
  color: var(--sf3d-bg) !important;
  border-radius: 0px !important;
}

.cart-products-count,
.badge.bg-primary,
.text-primary,
.header-block__icon {
  color: var(--sf3d-ink) !important;
}

a {
  color: var(--sf3d-ink);
}

/* 0b. SUPPRESSION DES DOUBLONS ET ELEMENTS SUPERFLUS */
.product-miniature[data-id-product="5"],
.product-miniature[data-id-product="7"] {
  display: none !important;
}

.product__description-short,
[data-container-express-checkout],
[data-container-bnpl],
[paypal-messaging-banner],
#stripe-express-checkout-element,
#payment-method-messaging-element,
.ps-sharebuttons,
#product_details,
.product-comments-wrapper,
#product-comments-list-header,
#empty-product-comment,
#product-comments-list,
.blockreassurance img.invisible,
.blockreassurance .reassurance__image {
  display: none !important;
}

.blockreassurance--product {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  border: 0 !important;
  padding: 12px 0 !important;
}

.blockreassurance--product .reassurance--link {
  border: 1px solid var(--sf3d-border) !important;
  border-radius: 0px !important;
  padding: 6px 12px !important;
  background: var(--sf3d-surface) !important;
  color: var(--sf3d-ink) !important;
  text-decoration: none !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
}

.blockreassurance--product .reassurance--link:hover {
  background: var(--sf3d-ink) !important;
  color: var(--sf3d-bg) !important;
  border-color: var(--sf3d-ink) !important;
}

#footer .footer__main-top {
  display: none !important;
}

#footer {
  border-top: 1px solid var(--sf3d-border) !important;
  background: var(--sf3d-bg) !important;
  background-color: var(--sf3d-bg) !important;
  color: var(--sf3d-ink) !important;
  padding: 16px 0 !important;
}

#footer .footer__main,
#footer .footer__main-bottom,
#footer .footer__bottom,
#footer .container,
#footer hr {
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  background: var(--sf3d-bg) !important;
  background-color: var(--sf3d-bg) !important;
  color: var(--sf3d-ink) !important;
}

#footer a,
.sf3d-copyright,
.sf3d-copyright a {
  color: var(--sf3d-ink) !important;
}

.sf3d-copyright a:hover {
  text-decoration: underline !important;
}

/* 1. PAGE PRODUIT 3D (CUBO 2, PAVILLONS 3D, RELICA 3) — PLEINE PAGE SOUS #header */
html:has(body.sf3d-cubo2-page),
body.sf3d-cubo2-page {
  overflow: hidden !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--sf3d-bg) !important;
}

body.sf3d-cubo2-page .breadcrumb,
body.sf3d-cubo2-page .breadcrumb__wrapper,
body.sf3d-cubo2-page nav[data-depth],
body.sf3d-cubo2-page .product__left,
body.sf3d-cubo2-page .product__right,
body.sf3d-cubo2-page .product__bottom,
body.sf3d-cubo2-page .product-accessories,
body.sf3d-cubo2-page .product-footer,
body.sf3d-cubo2-page .sf3d-cubo2-header,
body.sf3d-cubo2-page .sf3d-cubo2-actions,
body.sf3d-cubo2-page #footer {
  display: none !important;
}

body.sf3d-cubo2-page #wrapper,
body.sf3d-cubo2-page #wrapper > .container,
body.sf3d-cubo2-page #content-wrapper,
body.sf3d-cubo2-page #main,
body.sf3d-cubo2-page .product__container {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.sf3d-cubo2-page #sf3d-cubo2-root,
body.sf3d-cubo2-page .sf3d-cubo2-section {
  width: 100% !important;
  height: calc(100dvh - var(--sf3d-header-h, 130px)) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--sf3d-border) !important;
  border-radius: 0 !important;
  background: var(--sf3d-bg) !important;
  overflow: hidden !important;
}

/* 2. PAGE D'ACCUEIL (5426 Cathedrale 3D sans bandeau initial + Catalogue epure) */
body.sf3d-home-page:not(.sf3d-shop-entered) #header,
body.page-index:not(.sf3d-shop-entered) #header {
  display: none !important;
}

body.sf3d-home-page.sf3d-shop-entered #header,
body.page-index.sf3d-shop-entered #header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--sf3d-bg);
  border-bottom: 1px solid var(--sf3d-border);
  animation: sf3dFadeDown 0.35s ease;
}

@keyframes sf3dFadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.page-index #wrapper,
body.sf3d-home-page #wrapper {
  padding-top: 0 !important;
}

body.page-index #wrapper > .container,
body.sf3d-home-page #wrapper > .container {
  max-width: 100% !important;
  padding: 0 !important;
}

#content.page-content--home {
  display: flex !important;
  flex-direction: column !important;
}

.ps-imageslider,
#index #carousel,
.page-index #carousel,
.page-index .carousel,
.ps-banner {
  display: none !important;
}

#sf3d-home-hero,
.sf3d-home-hero {
  order: -10 !important;
  width: 100% !important;
  height: 100dvh !important;
  margin: 0 0 56px !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--sf3d-border) !important;
  overflow: hidden !important;
  background: var(--sf3d-bg) !important;
}

.ps-featuredproducts .section-title,
.featured-products .h2,
.ps-featuredproducts__footer,
.all-product-link {
  display: none !important;
}

/* 3. CATALOGUE EPURE & MODELISATIONS 3D */
.ps-featuredproducts,
#js-product-list {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto 80px !important;
  padding: 24px 32px !important;
}

.ps-featuredproducts .products,
#js-product-list .products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 24px !important;
}

@media (max-width: 600px) {
  .ps-featuredproducts,
  #js-product-list {
    padding: 16px !important;
    margin-bottom: 48px !important;
  }

  .ps-featuredproducts .products,
  #js-product-list .products {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
}

.ps-featuredproducts .product-miniature,
#js-product-list .product-miniature {
  margin: 0 !important;
  width: 100% !important;
}

.ps-featuredproducts .product-miniature__inner,
#js-product-list .product-miniature__inner {
  background: var(--sf3d-surface) !important;
  border: 1px solid var(--sf3d-border) !important;
  border-radius: 0px !important;
  box-shadow: none !important;
  padding: 0 !important;
  transition: border-color 0.18s ease, transform 0.18s ease !important;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ps-featuredproducts .product-miniature__inner:hover,
#js-product-list .product-miniature__inner:hover {
  border-color: var(--sf3d-ink) !important;
  transform: translateY(-2px);
}

.ps-featuredproducts .product-miniature__image-link,
#js-product-list .product-miniature__image-link {
  border-radius: 0px !important;
  outline: none !important;
  background: var(--sf3d-surface) !important;
}

.sf3d-card-canvas {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  background: transparent;
}

.ps-featuredproducts .product-miniature__quickview-button,
.ps-featuredproducts .product-miniature__quickview-touch,
.ps-featuredproducts .product-miniature__actions,
.ps-featuredproducts .product-miniature__form,
.ps-featuredproducts .product-miniature__reviews,
.ps-featuredproducts .grade-stars,
.ps-featuredproducts .product-flags,
#js-product-list .product-miniature__quickview-button,
#js-product-list .product-miniature__quickview-touch,
#js-product-list .product-miniature__actions,
#js-product-list .product-miniature__form,
#js-product-list .product-miniature__reviews,
#js-product-list .grade-stars,
#js-product-list .product-flags {
  display: none !important;
}

.ps-featuredproducts .product-miniature__bottom,
#js-product-list .product-miniature__bottom {
  padding: 16px 18px 18px !important;
  border-top: 1px solid var(--sf3d-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ps-featuredproducts .product-miniature__title,
.ps-featuredproducts .product-miniature__title a,
#js-product-list .product-miniature__title,
#js-product-list .product-miniature__title a {
  font-family: 'Alegreya', Georgia, serif !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--sf3d-ink) !important;
  text-decoration: none !important;
  line-height: 1.3 !important;
}

.ps-featuredproducts .product-miniature__price,
#js-product-list .product-miniature__price {
  font-family: 'Source Sans 3', sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: var(--sf3d-muted) !important;
}

/* v0.2.7 — Deblocage scroll mobile, tiroir menu mobile, anti-clignotement cartes 3D, mode sombre mobile */
@media (max-width: 900px) {
  html:has(body.sf3d-cubo2-page),
  body.sf3d-cubo2-page {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100dvh !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.sf3d-cubo2-page #sf3d-cubo2-root,
  body.sf3d-cubo2-page .sf3d-cubo2-section {
    height: auto !important;
    min-height: calc(100dvh - var(--sf3d-header-h, 56px)) !important;
    overflow: visible !important;
  }
}

/* Tiroir menu lateral PrestaShop (Mobile / Offcanvas) */
.offcanvas,
#mobile_top_menu_wrapper,
.mobile-menu,
.header-top__menu-drawer {
  z-index: 10050 !important;
  background-color: var(--sf3d-bg) !important;
  color: var(--sf3d-ink) !important;
}

.offcanvas a,
.offcanvas button,
.offcanvas span,
#mobile_top_menu_wrapper a,
#mobile_top_menu_wrapper button,
#mobile_top_menu_wrapper span {
  color: var(--sf3d-ink) !important;
}

html.sf3d-dark .offcanvas,
html.sf3d-dark .offcanvas-header,
html.sf3d-dark .offcanvas-body,
html.sf3d-dark #mobile_top_menu_wrapper,
html.sf3d-dark .mobile-menu {
  background-color: #151515 !important;
  color: #f4f2ee !important;
  border-color: rgba(244, 242, 238, 0.22) !important;
}

html.sf3d-dark .offcanvas .btn-close {
  filter: invert(1) !important;
}

/* Bouton Mode Sombre sur mobile dans .header-bottom (visible < 768px uniquement) */
.sf3d-mobile-theme-btn {
  display: none !important;
  background: transparent;
  border: 1px solid var(--sf3d-border);
  color: var(--sf3d-ink);
  border-radius: 0px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  align-items: center;
  margin-right: 6px;
}

@media (max-width: 767px) {
  .sf3d-mobile-theme-btn {
    display: inline-flex !important;
  }
}

#mobileMenu .ps-mainmenu__mobile .menu,
#mobileMenu .ps-mainmenu__mobile > ul:not(.sf3d-mobile-nav-list) {
  display: none !important;
}

.sf3d-mobile-nav-list {
  list-style: none !important;
  margin: 8px 0 16px !important;
  padding: 0 !important;
}

.sf3d-mobile-nav-list li a {
  display: block !important;
  padding: 12px 4px !important;
  border-bottom: 1px solid var(--sf3d-border) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  color: var(--sf3d-ink) !important;
}

/* Anti-clignotement des vignettes catalogue avant rendu 3D */
@keyframes sf3dRevealFallback {
  to {
    opacity: 1;
  }
}

.product-miniature__image-link img:not([data-sf3d-ready="1"]),
.product-thumbnail img:not([data-sf3d-ready="1"]) {
  opacity: 0;
  animation: sf3dRevealFallback 0.2s ease 2.2s forwards;
}

.product-miniature__image-link img[data-sf3d-ready="1"],
.product-thumbnail img[data-sf3d-ready="1"] {
  opacity: 1 !important;
  animation: none !important;
  transition: opacity 0.18s ease !important;
}


/* v0.3.1 - Un seul bouton theme PC/mobile, selecteur langue PC aligne, sans Deja vus, barre legale */
@media (min-width: 768px) {
  #sf3d-mobile-theme-btn,
  .sf3d-mobile-theme-btn {
    display: none !important;
  }
}

@media (max-width: 767px) {
  #sf3d-header-theme-btn,
  .sf3d-header-theme-btn {
    display: none !important;
  }
}

#header .header-top__left,
#_desktop_language_selector,
#_desktop_language_selector .language-selector-wrapper,
#_desktop_language_selector .language-selector {
  display: inline-flex !important;
  align-items: center !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

#_desktop_language_selector select,
#_desktop_language_selector .form-select {
  appearance: auto !important;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--sf3d-ink) !important;
  border: 1px solid var(--sf3d-border) !important;
  border-radius: 0px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 2px 8px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  width: auto !important;
}

#_desktop_language_selector svg,
#_desktop_language_selector i,
#_desktop_language_selector .expand-more,
#_desktop_language_selector .material-icons {
  display: none !important;
}

.ps-viewedproducts,
.viewed-products,
#viewed-products,
[data-module="ps_viewedproducts"] {
  display: none !important;
}

.sf3d-legal-links-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  padding: 12px 16px;
  margin-top: 4px;
  border-top: 0;
  background: var(--sf3d-bg);
}

.sf3d-legal-links-bar a {
  font-size: 11.5px;
  color: var(--sf3d-muted) !important;
  text-decoration: none;
}

.sf3d-legal-links-bar a:hover {
  color: var(--sf3d-ink) !important;
  text-decoration: underline;
}


/* v0.3.2 - Ciblage exact du selecteur de langue Hummingbird (#_desktop_ps_languageselector / .ps-languageselector) */
#_desktop_ps_languageselector,
#_mobile_ps_languageselector,
.ps-languageselector {
  display: inline-flex !important;
  align-items: center !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
}

#_desktop_ps_languageselector select,
#_mobile_ps_languageselector select,
.ps-languageselector select,
.ps-languageselector .form-select {
  appearance: auto !important;
  -webkit-appearance: menulist !important;
  background-color: transparent !important;
  background-image: none !important;
  color: var(--sf3d-ink) !important;
  border: 1px solid var(--sf3d-border) !important;
  border-radius: 0px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 2px 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  width: auto !important;
  box-shadow: none !important;
}

#_desktop_ps_languageselector select option,
.ps-languageselector select option {
  background: var(--sf3d-bg);
  color: var(--sf3d-ink);
}

#_desktop_ps_languageselector svg,
#_desktop_ps_languageselector i,
#_desktop_ps_languageselector .expand-more,
.ps-languageselector svg,
.ps-languageselector i,
.ps-languageselector .expand-more {
  display: none !important;
}
