/* TART:___utils___ */
@use "../vendors/bootstrap" as *;
@use "../abstracts/mixins" as *;

/* Body Styles */
body {
  background-color: var(--ev-body-bg, white);
  color: var(--ev-text-color, rgb(31, 31, 31));
}

/* Container Styles */
.container {
  width: 100%;
  padding-inline: var(--ev-grid-gutter);
  margin-inline: auto;

  @include media-breakpoint-up(md) {
    max-width: clamp(
      var(--ev-grid-min-width, 20rem),
      var(--ev-grid-preferred-width, 80%),
      var(--ev-grid-max-width, 62rem)
    );
  }
}

.container-fluid {
  width: 100%;
  padding-inline: var(--ev-grid-gutter);
  margin-inline: auto;
}

.empty-icon-container {
  place-content: center;
}

.animation-container {
  margin-bottom: var(--ev-space-xl);
}

#home .main-content > * {
  margin-top: var(--ev-space-3xl-4xl);
}

.main-content {
  margin-bottom: var(--ev-space-5xl);
}

.list-style-none {
  list-style-type: none;
}

br {
  margin-bottom: 6px;
  display: block;
}

@include media-breakpoint-down(lg) {
  figure {
    margin-bottom: var(--ev-space-s-m);
  }
}

.banner-bg {
  --bg-color: var(--ev-light);
  --bg-text-color: none;
  --bg-img: none;
  --bg-pos: 0 0;
  --bg-blend: normal;

  position: relative;
  padding-block: var(--ev-space-xl);
  z-index: 1;

  & * {
    color: var(--bg-text-color);
  }

  &::before {
    content: "";
    position: absolute;
    background-color: var(--bg-color);
    inset: 0;
    z-index: -1;
  }

  &::after {
    content: "";
    position: absolute;
    background-image: var(--bg-img);
    background-size: var(--bg-size, cover);
    background-repeat: no-repeat;
    background-position: var(--bg-pos, 0 0);
    inset: 0;
    z-index: -2;
  }
}

main {
  display: grid;
  gap: var(--ev-space-xl-2xl);
  grid-template-columns: minmax(0, 1fr);
}

/* App Object Styles */
[id^="app_objet-"] {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: ".." "section" "..";
  grid-template-rows: 1fr auto 1fr;
}

[id^="app_objet"] > :is(section, footer) {
  grid-area: section;
}

/* Loader Styles */
.loader {
  border: 2px solid #f3f3f3;
  border-radius: 50%;
  border-top: 2px solid var(--ev-primary, var(--ev-dark));
  width: 25px;
  height: 25px;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
  margin-inline: auto;
}

/* See More Icon Styles */
#seeMoreIcon {
  position: relative;
  display: grid;
  place-content: center;
  animation: seeMoreIcoAnimation 1s ease-in infinite;
}

/* Progress Bar Styles */
#progress-bar {
  --progress: 0;
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 0;
  height: 2px;
  width: var(--progress);
  background-color: var(--ev-primary, var(--ev-dark));
  border-radius: 100vmax;
  z-index: 1;
}

/* Product List Body Styles */
.product-list__body {
  position: relative;
}

/* Loading Wrapper Styles */
.loading-wrapper {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--ev-dark);
  z-index: 1;

  &::before {
    margin-top: 10%;
    margin-bottom: 3%;
    content: "Chargement";
    display: flex;
    place-content: center;
  }
}

/* Toast Styles */
.jq-toast-single {
  background-color: var(--ev-dark);
}

/* Accessibility and Miscellaneous Styles */
[aria-disabled="true"] {
  filter: none !important;
}

.grecaptcha-badge {
  visibility: hidden;
}

.no-link {
  cursor: default;
  pointer-events: none;
  display: none !important;
}

/* Simple Lightbox Styles */
.sl-overlay {
  background: #000;
}

.sl-wrapper .sl-navigation button,
.sl-wrapper .sl-close,
.sl-wrapper .sl-counter {
  color: #fff;
}

.sl-image img {
  visibility: visible;
}

.sl-wrapper.simple-lightbox * {
  color: white !important;
}

/* Responsive Utility Classes */
.d-none {
  display: none !important;
}

@include media-breakpoint-down(xs) {
  .d-xs-none {
    display: none;
  }
}

@include media-breakpoint-up(sm) {
  .d-sm-none {
    display: none;
  }
}

@include media-breakpoint-up(md) {
  .d-md-none {
    display: none;
  }
}

@include media-breakpoint-up(lg) {
  .d-lg-none {
    display: none;
  }
}

@include media-breakpoint-up(xl) {
  .d-xl-none {
    display: none;
  }
}

/* Border and Font Weight Utilities */
.border-0 {
  border-color: transparent;
}

/* Hidden Elements */
[hidden] {
  display: none !important;
}

/* Theme Variants */
.theme-white *,
.theme-white *::before,
.theme-white *::after {
  color: white !important;
  border-color: white !important;
}

.theme-white .btn-primary {
  --ev-btn-bg: white;
  color: var(--ev-body-color) !important;

  i::before {
    color: var(--ev-body-color) !important;
  }
}

.theme-dark {
  --ev-primary: var(--ev-dark);

  .btn-primary {
    --btn-color: white;
  }
}

.theme-danger {
  --ev-primary: var(--ev-danger);

  .btn-primary {
    --btn-color: white;
  }
}

.theme-success {
  --ev-primary: var(--ev-success);

  .btn-primary {
    --btn-color: white;
  }
}

.theme-info {
  --ev-primary: var(--ev-info);
}

.theme-warning {
  --ev-primary: var(--ev-warning);
}

.theme-secondary {
  --ev-primary: var(--ev-secondary);
}

.theme-tertiary {
  --ev-primary: var(--ev-tertiary);
}

.theme-quaternary {
  --ev-primary: var(--ev-quaternary);
}

.theme-senary {
  --ev-primary: var(--ev-senary);

  .btn-primary {
    --btn-color: white;
  }
}

/* Spectrum Theme */
.theme-spectrum .theme-container {
  & > :nth-child(5n + 2) {
    --ev-primary: var(--ev-secondary);
  }

  & > :nth-child(5n + 3) {
    --ev-primary: var(--ev-tertiary);
  }

  & > :nth-child(5n + 4) {
    --ev-primary: var(--ev-quaternary);
  }

  & > :nth-child(5n + 5) {
    --ev-primary: var(--ev-senary);

    .btn-primary {
      --btn-color: white;
    }
  }
}

/* Collapse Body Styles */
.collapse-body {
  display: block;
  overflow: hidden;
  max-height: 1000vh;
  opacity: 1;
  padding: 1px;
  transition: all 0.5s;
  margin-top: 16px;

  &.collapsed {
    margin-top: 0;
    max-height: 0;
    opacity: 0;
  }
}

.dropdown-inspector .dropdown-menu {
  --bs-dropdown-font-size: var(--ev-step--2);
  --bs-dropdown-color: white;
  --bs-dropdown-bg: var(--ev-dark);
  --bs-dropdown-border-radius: 0;
  --bs-dropdown-link-color: white;
  --bs-dropdown-link-hover-color: white;
  --bs-dropdown-link-hover-bg: #373737;
  --bs-dropdown-link-active-bg: #373737;
  --bs-dropdown-header-color: white;
  border: 1px solid rgba(255, 255, 255, 0.2509803922);
  padding: 0;
}

.dropdown-inspector .icon {
  margin-right: var(--ev-space-3xs);
  --icon-height: 14px;
  --icon-color: #cdcdcd;
}

.dropdown-inspector .icon--copy {
  --icon-height: 16px;
}

.dropdown-inspector .dropdown-item.copied::after {
  --icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3C!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--%3E%3Cpath d='M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7l233.4-233.3c12.5-12.5 32.8-12.5 45.3 0z'/%3E%3C/svg%3E");
  --icon-height: 12px;
  content: "";
  display: inline-block;
  vertical-align: middle;
  background-size: contain;
  -webkit-mask: var(--icon-url) no-repeat center center;
  mask: var(--icon-url) no-repeat center center;
  height: var(--icon-height, var(--ev-icon-height, 16px));
  width: var(
    --icon-width,
    var(--ev-icon-width, var(--icon-height, var(--ev-icon-height, 16px)))
  );
  background-color: var(--icon-color, currentColor);
}

.dropdown-inspector .dropdown-item {
  display: flex;
  place-content: space-between;
  align-items: center;
  padding-block: 8px;
}

.dropdown-inspector .dropdown-menu li:not(:last-child) .dropdown-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2509803922);
}

.combi-var {
  text-transform: capitalize;
}

[id^="article_link-"] .banner-bg,
[id^="compose_page-"] .banner-bg,
[id^="page_link-"] .banner-bg {
  padding-block: var(--ev-space-s);
}

.breadcrumb {
  margin-bottom: 0;
}

.breadcrumb-wrapper {
  background: var(--ev-light);
  padding-block: var(--ev-space-xs);
}

a[href="#"]:not([type="button"]):not([data-modal-type="form"]) {
	display: none;
}

.sf-minitoolbar a {
	display: block !important;
}

.loaded-image,
.broken-image {
  background: transparent;
}

.loaded-image img,
.broken-image img {
  visibility: visible;
}

.daterangepicker .drp-calendar {
  max-width: revert-layer;
}

.page-form-modal .modal-body {
  opacity: 1;
}

.modal-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  transition: opacity 0.3s ease-in-out;
  background-color: white;
  z-index: 1;
}

.modal-loader::after {
  content: "";
  display: block;
  width: 1.2em;
  height: 1.2em;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -0.6em;
  margin-top: -0.6em;

  /* Instead of four different colors, use transparent on three sides */
  border: 0.2em solid rgba(0, 0, 0, 0.6);

  /* Then pick one color for the "arc"—here it's white (#fff) */
  border-top-color: #fff;

  border-radius: 100rem;
  animation: loading-spin 0.6s infinite linear;

  /* If you don’t need the box-shadow, remove it; otherwise keep it */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0);
  z-index: 2;
}

/* Example spinner animation */
@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.daterangepicker .calendar-table th,
.daterangepicker .calendar-table td {
  min-width: auto;
  width: auto;
  height: auto;
  border: none;
  line-height: 1;
  font-size: var(--ev-step--2);
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
  background-color: var(--ev-primary);
}

.sl-overlay {
  background: black !important;
}

#app_all_objets > :not(:last-child):not(.sticky-cta):not(.floating-google-review) {
	margin-bottom: var(--ev-space-4xl) !important;
}

/* END:___utils___ */
