/**
 * Site-wide blocks below the content: blog posts block (prestawp), customer logos
 * (kixcustomerslist) and footer. Loaded last in <head> (stylesheets.tpl), after mh-header.css.
 * Static files are cached for a year: bump ?v= in stylesheets.tpl on every change.
 */

:root {
  --mh-navy: #0c193a;
  --mh-navy-2: #13234d;
  --mh-orange: #e65021;
  --mh-orange-dark: #cf4419;
  --mh-line: #e8ebf0;
  --mh-text: #5b6475;
}

/* ------------------------------------------------------------------ */
/* Blog posts block                                                    */
/* ------------------------------------------------------------------ */
.prestawpblock {
  margin: 0 0 64px !important;
  padding: 0;
}

.prestawpblock > h2 {
  margin: 0 0 24px !important;
  padding: 0;
  font-size: 32px !important;
  font-weight: 700 !important;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-align: left !important;
  text-transform: none !important;
  color: var(--mh-navy) !important;
}

.prestawpblock > h2::after {
  content: none;
  display: none;
}

.prestawpblock .posts_container {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  height: auto !important;
  margin: 0 !important;
}

.prestawpblock .pswp-post {
  position: static !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  transform: none !important;
}

.prestawpblock .pswp-post > a.pswp-post-wrp {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--mh-line);
  border-radius: 14px;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.prestawpblock .pswp-post > a.pswp-post-wrp:hover {
  border-color: #d3d9e3;
  box-shadow: 0 12px 30px rgba(12, 25, 58, 0.08);
}

.prestawpblock .pswp-post .rc {
  overflow: hidden;
  margin: 0;
}

.prestawpblock .pswp-post .pswp-post-image {
  transition: transform 0.35s ease;
}

.prestawpblock .pswp-post > a:hover .pswp-post-image {
  transform: scale(1.04);
}

.prestawpblock .pswp-post-fi-title {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 16px 18px 20px !important;
  text-align: left;
  background: none !important;
}

.prestawpblock .pswp-post-fi-title h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin: 0;
  overflow: hidden;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  color: var(--mh-navy);
  transition: color 0.15s ease;
}

.prestawpblock .pswp-post > a:hover .pswp-post-fi-title h3 {
  color: var(--mh-orange);
}

.prestawpblock .pswp-post-fi-title p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin: 0;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--mh-text);
}

/* ------------------------------------------------------------------ */
/* Customer logos                                                      */
/* ------------------------------------------------------------------ */
.cl-mh {
  margin: 0 0 64px !important;
  padding: 36px 32px 32px !important;
  text-align: center;
  background: #fff !important;
  border: 1px solid #eceff3;
  border-radius: 24px;
}

.cl-mh > h2 {
  margin: 0 0 22px !important;
  padding: 0;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a93a3 !important;
}

.cl-mh > h2::after {
  content: none;
  display: none;
}

.cl-mh .container {
  max-width: none;
  padding: 0;
}

.cl-mh .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px 52px;
  margin: 0;
}

.cl-mh .row > div {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
}

.cl-mh img {
  display: block;
  width: auto;
  height: 46px;
  max-width: 130px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.cl-mh img:hover {
  filter: none;
  opacity: 1;
}

/* ------------------------------------------------------------------ */
/* Hidden Bootstrap modals (mobile menu, filters) at the end of <body>: */
/* on pages where the theme's modal rules are not loaded they stayed in */
/* the flow and added ~300px of white below the footer.                */
/* ------------------------------------------------------------------ */
body > .modal:not(.show) {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Footer — one grid: the module containers are flattened              */
/* (display: contents) so every block lands in the same 4 columns.     */
/*   row 1: newsletter (cols 1-3) · social (col 4)                     */
/*   row 2: hairline                                                   */
/*   row 3: Produits · Notre société · Votre compte · Contact          */
/*   row 4: legal line                                                 */
/* ------------------------------------------------------------------ */
#footer.l-footer {
  margin-top: 24px;
  padding: 0 !important;
  color: rgba(255, 255, 255, 0.7);
  background: var(--mh-navy);
  border: 0 !important;
}

#footer.l-footer a,
#footer.l-footer .qcd,
#footer.l-footer .btnst,
#footer.l-footer .footer-container ul li button {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.15s ease;
}

#footer.l-footer a:hover,
#footer.l-footer .qcd:hover,
#footer.l-footer .btnst:hover,
#footer.l-footer .footer-container ul li button:hover {
  color: #fff;
}

/* Titles */
#footer .footer__title,
#footer .contact::before {
  margin: 0 0 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff !important;
}

#footer .footer__title::after {
  content: none;
  display: none;
}

/* Newsletter */
#footer .block_newsletter #block-newsletter-label {
  margin: 0;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff !important;
}

#footer .block_newsletter #block-newsletter-label span {
  display: block;
  margin-top: 4px;
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
}

#footer .block_newsletter .input-group {
  flex-wrap: nowrap;
  padding: 4px;
  background: #fff;
  border-radius: 12px;
}

#footer .block_newsletter .form-control {
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--mh-navy);
  background: transparent;
  border: 0 !important;
  box-shadow: none !important;
}

#footer .block_newsletter .input-group-append .btn {
  height: 40px;
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: var(--mh-orange);
  border: 0;
  border-radius: 9px !important;
  transition: background-color 0.15s ease;
}

#footer .block_newsletter .input-group-append .btn:hover {
  background: var(--mh-orange-dark);
}

#footer .block_newsletter p.small {
  margin: 8px 0 0 !important;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45) !important;
}

/* Social */
#footer .social {
  display: flex;
  gap: 8px;
  border: 0 !important;
}

#footer .social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0 !important;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: background-color 0.15s ease;
}

#footer .social a:hover {
  background: var(--mh-orange);
}

#footer .social svg {
  width: 18px;
  height: 18px;
  margin: 0 !important;
}

#footer .social svg,
#footer .social svg path {
  fill: #fff !important;
}

/* Link lists */
#footer .footer-container ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#footer .footer-container ul li {
  margin: 0;
  padding: 3px 0;
  font-size: 13.5px;
  line-height: 1.5;
}

#footer .footer-container ul li a,
#footer .footer-container ul li .qcd,
#footer .footer-container ul li .btnst,
#footer .footer-container ul li button {
  display: inline;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 400;
  background: none;
  border: 0;
  opacity: 1;
  cursor: pointer;
}

/* Contact column */
#footer .contact {
  display: block !important; /* theme: flex, which pushed the column down */
  border: 0 !important;
}

#footer .contact::before {
  content: 'Contact';
  display: block;
}

#footer .contact > .row {
  display: block;
  margin: 0;
}

#footer .contact > .row > div {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

#footer .contact .tel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#footer .contact .tel a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
}

#footer .contact .tel a:hover {
  color: #ff8a5c;
}

#footer .contact .tel svg {
  flex: 0 0 auto;
  width: 18px;
  height: 12px;
  margin: 0 !important;
  border-radius: 2px;
}

#footer .contact .adr {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.5);
}

#footer .contact .adr a[href^='mailto'] {
  display: table;
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #ff8a5c;
}

#footer .contact .adr a[href^='mailto']:hover {
  color: #fff;
}

/* Empty helpers rendered by modules */
#footer .social-sharing,
#footer #g_id_onload,
#footer > script,
#footer .footer-container script {
  display: none !important;
}

@media (min-width: 992px) {
  #footer.l-footer {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: 48px;
    padding: 0 max(16px, calc((100% - 1140px) / 2)) !important;
  }

  #footer.l-footer > .container,
  #footer.l-footer > .container > .row,
  #footer .footer-container,
  #footer .footer-container > .container,
  #footer .footer-container > .container > .row {
    display: contents !important; /* the theme forces display: grid on these rows */
  }

  #footer.l-footer > .container > .row > div,
  #footer .footer-container > .container > .row > div {
    width: auto !important; /* the theme fixes some widths (96px…) */
    max-width: none !important;
    flex: none;
    margin: 0;
    padding: 0;
  }

  #footer .footer-container ul {
    columns: auto;
  }

  /* Row 1 */
  #footer .block_newsletter {
    grid-row: 1;
    grid-column: 1 / 4;
    padding: 32px 0 !important;
  }

  #footer .block_newsletter > .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 0 32px;
    align-items: center;
    margin: 0;
  }

  #footer .block_newsletter > .row > * {
    width: auto;
    max-width: none;
    flex: none;
    padding: 0;
  }

  #footer .social {
    grid-row: 1;
    grid-column: 4;
    align-self: center;
    justify-self: end;
    padding: 32px 0 !important;
  }

  /* Row 2: hairline */
  #footer.l-footer::before {
    content: '';
    grid-row: 2;
    grid-column: 1 / -1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
  }

  /* Row 3 */
  #footer .footer-container .footer__title--mobile {
    display: none !important;
  }

  #footer .footer-container ul.collapse {
    display: block !important;
  }

  #footer .footer-container > .container > .row > div,
  #footer .contact {
    grid-row: 3;
    padding: 32px 0 28px !important;
  }

  /* Produits: two short columns */
  #footer .footer-container > .container > .row > div:first-child ul {
    columns: 2 !important;
    column-gap: 24px;
  }

  #footer .contact {
    grid-column: 4;
  }

  /* Row 4: legal line */
  #footer.l-footer::after {
    content: '© Matériel Horeca';
    grid-row: 4;
    grid-column: 1 / -1;
    padding: 16px 0 18px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 991.98px) {
  #footer.l-footer > .container:first-child {
    padding-top: 28px;
    padding-bottom: 8px;
  }

  #footer .block_newsletter {
    margin-bottom: 20px;
  }

  #footer .block_newsletter #block-newsletter-label {
    margin-bottom: 12px;
  }

  #footer .social {
    justify-content: flex-start;
    margin-bottom: 24px;
    padding: 0 15px;
  }

  #footer .contact {
    margin-bottom: 8px;
  }

  #footer .contact .tel {
    align-items: flex-start;
    text-align: left;
  }

  #footer .contact .adr {
    text-align: left;
  }

  #footer .footer__title--desktop {
    display: none !important;
  }

  #footer .footer__title--mobile {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin: 0 !important;
    padding: 14px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  #footer .footer__title--mobile svg,
  #footer .footer__title--mobile svg path {
    fill: #fff !important;
  }

  #footer .footer-container ul {
    padding: 8px 0 12px;
  }

  #footer.l-footer::after {
    content: '© Matériel Horeca';
    display: block;
    padding: 18px 15px 22px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
  }
}

@media (max-width: 991.98px) {
  .prestawpblock .posts_container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prestawpblock > h2 {
    font-size: 26px !important;
  }
}

@media (max-width: 575.98px) {
  .prestawpblock {
    margin: 0 0 40px !important;
    padding: 0 16px;
  }

  .prestawpblock > h2 {
    font-size: 23px !important;
  }

  .prestawpblock .posts_container {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: 12px;
    margin: 0 -16px !important;
    padding: 4px 16px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    scrollbar-width: none;
  }

  .prestawpblock .pswp-post {
    scroll-snap-align: start;
  }

  .cl-mh {
    margin: 0 16px 40px !important;
    padding: 28px 16px 24px !important;
  }

  .cl-mh .row {
    gap: 18px 32px;
  }

  .cl-mh img {
    height: 36px;
    max-width: 100px;
  }
}
