/**
 * Theme Name: AcPresse
 * Template:   twentytwentyfive
 */

:root {
  --acpress-breakpoint-tablet: 1024px;
  --acpress-breakpoint-mobile: 782px;
  --acpress-breakpoint-main-content: 1246px;
  --acpress-admin-bar-height: 0px;
}

.scrolled-header {
  opacity: 0;
  pointer-events: none;
  transition: none;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
}

.wp-block-site-logo img {
  transition: all 0.1s linear;
}

/* Move down if admin bar is present */
body.admin-bar .scrolled-header {
  --acpress-admin-bar-height: 32px;
  top: var(--acpress-admin-bar-height);
  /* Default admin bar height on desktop */
}

@media screen and (max-width: 782px) {
  body.admin-bar .scrolled-header {
    --acpress-admin-bar-height: 46px;
    top: var(--acpress-admin-bar-height);
    /* Admin bar height on mobile */
  }
}

.scrolled-header.active {
  display: block;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}

.editor-styles-wrapper .scrolled-header {
  position: relative;
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.acpresse-main-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 30px;
}

.acpresse-main-content {
  max-width: 850px;
  flex-grow: 1;
}

@media screen and (max-width: 1246px) {
  .acpresse-main-container {
    flex-wrap: wrap;
    justify-content: center;

    >* {
      flex-grow: 1;
    }
  }

  .acpresse-main-content {
    max-width: 100%;

    >article {
      width: 100%;
    }
  }
}

.desktop-header {
  display: block;

  .default-header {
    .wp-block-button__link {
      font-size: 20px;
      padding: 18px 27px;
    }

    @media screen and (max-width: 1346px) {
      .wp-block-button__link {
        font-size: 18px;
        padding: 15px 24px;
      }
    }

    @media screen and (max-width: 1246px) {
      .wp-block-button__link {
        font-size: 16px;
        padding: 14px 20px;
      }
    }

    @media screen and (max-width: 1146px) {
      .wp-block-button__link {
        font-size: 15px;
        padding: 13px 19px;
      }
    }
  }

  .scrolled-header {
    .wp-block-button__link {
      font-size: 15px;
      padding: 14px 20px;
    }

    @media screen and (max-width: 1246px) {
      .wp-block-button__link {
        font-size: 14px;
        padding: 13px 17px;
      }
    }

    @media screen and (max-width: 1146px) {
      .wp-block-button__link {
        font-size: 12px;
        padding: 10px 14px;
      }
    }
  }
}


.tablet-header {
  display: none;

  .wp-block-navigation__responsive-close .wp-block-navigation__responsive-container-content .wp-block-buttons {
    flex-wrap: nowrap;
  }

  .default-header {

    .wp-block-button__link,
    .wp-block-woocommerce-customer-account {
      font-size: 14px !important;
      padding: 12px 18px;
    }

    @media screen and (max-width: 970px) {

      .wp-block-button__link,
      .wp-block-woocommerce-customer-account {
        font-size: 13px !important;
        padding: 11px 17px;
      }

      .wp-block-site-logo img {
        width: 220px;
        transition: all 0.1s linear;
      }
    }

    @media screen and (max-width: 890px) {

      .wp-block-site-logo img {
        width: 200px;
        transition: all 0.1s linear;
      }

      .wp-block-button__link,
      .wp-block-woocommerce-customer-account {
        font-size: 12px !important;
        padding: 10px 14px;
      }
    }
  }

  .scrolled-header {

    .wp-block-button__link,
    .wp-block-woocommerce-customer-account {
      font-size: 12px;
      padding: 10px 15px;
    }

    @media screen and (max-width: 970px) {

      .wp-block-button__link,
      .wp-block-woocommerce-customer-account {
        font-size: 11px;
        padding: 10px 14px;
      }
    }

    @media screen and (max-width: 890px) {

      .wp-block-button__link,
      .wp-block-woocommerce-customer-account {
        font-size: 10.5px;
        padding: 10px 12px;
      }
    }
  }
}

.mobile-header {
  display: none;

  .wp-block-button__link {
    font-size: 15px;
    padding: 14px 20px;
  }
}

.ac-footer-tablet-grid {
  max-width: 280px;
}

@media screen and (max-width: 1024px) {
  .desktop-header {
    display: none;
  }

  .tablet-header {
    display: block;
  }

  .ac-footer-tablet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 100%;
  }
}

@media screen and (max-width: 782px) {
  .tablet-header {
    display: none;
  }

  .mobile-header {
    display: block;
  }

  .ac-footer-tablet-grid {
    display: flex;
    gap: 40px;
    max-width: 100%;
  }

  .ac-footer-menus * {
    min-width: 100%;
    font-size: 20px;
  }
}

.wp-block-button.is-style-flash-sale-button {
  .wp-block-button__link {
    background: #B82626;
    white-space: nowrap;
    padding: 6px 8px;
    border-radius: 3px;
    font-size: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;

    &::before {
      content: "";
      display: inline-block;

      width: 1em;
      height: 1em;

      background-image: url("./assets/img/flash-sale.svg");
      background-repeat: no-repeat;
      background-position: center;
      background-size: contain;
    }

    /* &::before {
      content: url("./assets/img/flash-sale.svg");
      width: 16px;
      height: 16px;
    } */
  }

  &.breakable {
    .wp-block-button__link {
      white-space: normal;
      flex-wrap: wrap;
      justify-content: center;
    }
  }
}

.wp-block-button.is-style-header-white-button .wp-block-button__link {
  border-radius: 0px;
  color: black;
  background: white;
  transition: 0.3s;
  white-space: nowrap;
}

.wp-block-button.is-style-header-white-button .wp-block-button__link:hover {
  background-color: #f4f4f4;
}

.wp-block-button.is-style-header-grey-button .wp-block-button__link {
  border-radius: 0px;
  color: black;
  background-color: #f4f4f4;
  transition: 0.3s;
  white-space: nowrap;
}

.wp-block-button.is-style-header-grey-button .wp-block-button__link:hover {
  background: #e9e9e9;
}

.wp-block-button.is-style-primary-button .wp-block-button__link {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #fff;
  background-color: #262626;
  transition: 0.3s;
  white-space: nowrap;
}

.wp-block-button.is-style-primary-button .wp-block-button__link:hover {
  background: #262626dd;
}

.wp-block-post-terms.is-style-hashtag-terms {
  a {
    text-decoration: none;
    font-weight: 400;
  }

  a:hover {
    text-decoration: underline;
  }

  a::before {
    content: "#";
  }
}

.wc-block-featured-category {
  background: #fff;
}

.ac-flash-post-list .wp-block-post {
  border-bottom: 1px solid #e7e9ea !important;
  padding-bottom: 12px !important;
}

.ac-flash-post-list .wp-block-post:last-of-type {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}

input[type="radio"].ac-radio {
  appearance: none;
  border: 0.5px solid #000;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  width: 16px;
  height: 16px;

  &::after {
    content: "";
    position: absolute;
    inset: 2px;
    /* padding between border and dot */
    background-color: #000;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
  }

  &.medium {
    width: 24px;
    height: 24px;

    &::after {
      inset: 5px;
    }
  }

  &.big {
    width: 40px;
    height: 40px;

    &::after {
      inset: 8px;
    }
  }

  &:checked::after {
    opacity: 1;
  }
}

.ac-form .ginput_container_text input[type="text"],
.ac-form .ginput_container_email input[type="email"],
input.ac-input-text {
  padding: 10px;
  border: 1px solid #D4D4D4;
  border-radius: 6px;
  font-size: 16px;

  &::placeholder {
    color: #ADAEBC;
  }
}

a.ac-link {
  color: #525252;

  a {
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }
}

.ac-login-register-container {
  display: flex;
  flex-direction: column;
  gap: 40px;

  .ac-login-register-title {
    display: flex;
    flex-direction: column;
    gap: 5px;

    h2 {
      font-size: 44px;
      font-weight: 500;
      margin: 0;
    }
  }

  .ac-login-register-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .ac-form {
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    display: none;
    width: 100%;

    &.ac-login {
      max-width: 500px;
    }

    &.ac-register {
      max-width: 700px;
    }

    &.active {
      display: flex;
    }

    label,
    .gfield_label {
      font-size: 16px;
      color: #111111;
      font-weight: 400;
    }

    .ac-form-field {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    select {
      border-color: #d4d4d4;
      border-radius: 8px;
      font-size: 16px;
    }

    .ac-input-text {
      padding: 15px;
    }

    .ac-link {
      margin-left: auto;
      font-size: 16px;
    }

    .wp-block-button__link {
      width: 100%;
    }

    .company-infos {
      border: none;
      margin: 0;

      h3 {
        margin: 0;
        font-weight: 600;
        font-size: 20px;
      }
    }

    .gform_footer>.gform_button {
      width: 100% !important;
      border-radius: 6px !important;
      background: black !important;
      color: white !important;
      font-size: 16px !important;
      padding: 16px 36px !important;
      font-weight: 400 !important;
    }
  }

  .ac-tab-selector-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 12px;

    .wp-block-button__link {
      width: fit-content;
      background-color: white;
      color: black;
      border: 1px solid black;

      &:hover {
        background-color: #f4f4f4;
      }

      &.active {
        background-color: black;
        color: white;
      }

      &:hover.active {
        background-color: #222222;
      }
    }
  }
}

div[class^="ac-ads-"] {
  width: 100%;

  img {
    width: 100%;
    height: auto;
  }
}

.ac-full-width {
  width: 100%;
}

.ac-sidebar-400 {
  min-width: 400px;
}

.ac-annuaire {

  &>div {
    max-width: 100%;

    .gv-widgets-header>div>div {
      display: grid;

      form {
        display: grid;
        grid-template-columns: repeat(3, 1fr);

        @media screen and (max-width: 900px) {
          grid-template-columns: repeat(2, 1fr);
          gap: 10px;
        }

        .gv-search-box-submit input[type="submit"] {
          border: 1px solid #e5e7eb;
          border-radius: 6px;
          color: #fff;
          background-color: #262626;
          transition: 0.3s;
          white-space: nowrap;
          font-size: 16px;
          padding: 10px 16px;

          &:hover {
            background-color: #262626dd;
          }
        }
      }

      form:last-child {
        grid-column: span 3;
      }
    }

    .gv-list-container {
      .related_annu {
        display: grid;
        grid-template-columns: repeat(3, 1fr);

        article {
          img {
            height: auto;
          }
        }
      }
    }

  }
}

.ac-details {
  padding: 14px 28px;
  border: 1px solid #ddd;

  summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;

    h2 {
      margin: 0;
      font-weight: 400;
      font-size: 1.1em;
    }

    .opened {
      display: none;
    }

    .closed {
      display: inline;
    }

  }
}

.ac-details[open] {
  summary {
    .opened {
      display: inline;
    }

    .closed {
      display: none;
    }
  }
}

#demandedocu {
  margin: 0;
  width: 100%;
  font-size: 16px;

  label,
  strong {
    font-weight: 600;
  }

  summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 480px;
    background: #e21e2e;
    color: #FFF;
    cursor: pointer;

    .arrows-container {
      display: flex;
      justify-content: center;
      align-content: center;
      flex-direction: column;
    }

    .opened {
      display: none;
    }

    .closed {
      display: inline;
    }

    h3 {
      margin: 0;
      font-weight: 400;
    }
  }

  &[open] {
    summary {
      .opened {
        display: inline;
      }

      .closed {
        display: none;
      }
    }
  }

  summary:hover {
    background: #f2f2f2;
    color: #e21e2e;
  }

  .fas {
    font-size: 21px;
  }

  .w40-960+.w50-960 {
    clear: both;
  }

  li.gfield {
    border: none;
    padding: 1rem !important;
  }

  #gform_fields_7::after {
    clear: both;
    content: '';
    display: table;
  }

  .gform_footer.top_label {
    padding: 0 1rem 1rem;
  }

  select {
    width: 100%;
    padding-bottom: 13px;
  }

  .gfield_html {
    border-bottom: 1px solid #ddd !important;
    border-top: 1px solid #ddd !important;
    clear: both;
    margin-top: -1px;
  }

  .gform_footer.top_label {
    padding: 0 0 1rem;
  }

  .ac-doc-header {
    display: flex;
    align-items: flex-start;

    h3 {
      margin: 0;
    }

    .ac-doc-title {
      display: flex;
      flex-direction: column;
      align-items: start;
      justify-content: center;
      width: 70%;

      h3 {
        font-weight: 600;
      }
    }

    .ac-doc-img-container {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 30%;
      border: 1px solid #ddd;

      img {
        padding: 14px;
        box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
        width: 100%;
      }
    }
  }

  .ac-doc-address-container {

    display: flex;
    justify-content: space-between;
    gap: 20px;

    .ac-doc-address-card,
    .ac-doc-contact-card {
      padding: 28px;
      background-color: #f5f5f5;
    }

    .ac-doc-contact-card {
      flex-grow: 1;
    }
  }
}

.wp-block-woocommerce-product-collection ul li:last-of-type {

  .wp-block-group {
    padding-bottom: 0 !important;
  }

  .wp-block-separator {
    display: none;
  }
}

.ac-custom-details {
  summary {
    background-color: black;
    color: white;
    padding: 14px 28px;
  }
}

.ac-display-none {
  display: none !important;
}

.ac-is-relative {
  position: relative !important;
}

.ac-tooltip {
  display: none;
  position: absolute;
  background-color: #333;
  color: #fff;
  padding: 5px;
  border-radius: 5px;
  font-size: 12px;
  z-index: 1000;
}

.wp-block-post-author .wp-block-post-author__avatar {
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
}