/* =========================================================
   COMPONENTS
   ========================================================= */
/* NAVBAR ================================================== */
.framex-navbar {
  width: 100%;
  background: var(--framex-color-bg-white);
  border-bottom: 1px solid var(--framex-color-bg-grey-2);
}

.framex-navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* LOGO */
.framex-navbar-logo {
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: var(--framex-color-text-black-2);
  white-space: nowrap;
}

.framex-navbar-logo:focus-visible {
  outline: 2px solid var(--framex-color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* MENU DESKTOP */
.framex-navbar-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.framex-navbar--menu-center .framex-navbar-menu {
  margin-left: auto;
  margin-right: 0;
}

/* Centre le menu uniquement si des actions existent a droite */
.framex-navbar--menu-center:has(.framex-navbar-actions:not(:empty))
  .framex-navbar-menu {
  margin-right: auto;
}

.framex-navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 12px;
}

.framex-navbar-actions:empty {
  display: none;
}

.framex-navbar-menu-actions {
  display: none;
}

.framex-navbar-menu a {
  position: relative;
  text-decoration: none;
  color: var(--framex-color-text-grey-2);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  padding: 4px 0;
}

.framex-navbar-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--framex-color-text-black-2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.framex-navbar-menu a:hover {
  color: var(--framex-color-text-black-2);
}

.framex-navbar-menu a:hover::after,
.framex-navbar-menu a:focus-visible::after {
  transform: scaleX(1);
}

.framex-navbar-menu a:focus-visible {
  outline: 2px solid var(--framex-color-primary);
  outline-offset: 4px;
  border-radius: 4px;
}

/* BURGER BUTTON */
.framex-navbar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
}

.framex-navbar-toggle:focus-visible {
  outline: 2px solid var(--framex-color-primary);
  outline-offset: 2px;
}

/* ICON */
.framex-navbar-burger,
.framex-navbar-burger::before,
.framex-navbar-burger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--framex-color-text-black-2);
  position: relative;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.framex-navbar-burger::before,
.framex-navbar-burger::after {
  content: "";
  position: absolute;
  left: 0;
}

.framex-navbar-burger::before {
  top: -7px;
}

.framex-navbar-burger::after {
  top: 7px;
}

.framex-navbar-toggle[aria-expanded="true"] .framex-navbar-burger {
  background: transparent;
}

.framex-navbar-toggle[aria-expanded="true"] .framex-navbar-burger::before {
  top: 0;
  transform: rotate(45deg);
}

.framex-navbar-toggle[aria-expanded="true"] .framex-navbar-burger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* MOBILE */
@media (max-width: 992px) {
  .framex-navbar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .framex-navbar-actions {
    display: none;
  }

  .framex-navbar-menu {
    position: absolute;
    top: 64px;
    left: 50%;
    width: 100%; /*100vw*/
    max-width: 100%; /*100vw*/
    background: var(--framex-color-bg-white);
    border-bottom: 1px solid var(--framex-color-bg-grey-2);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 15px 12px;
    margin-left: 0;
    margin-right: 0;
    transform: translate(-50%, -12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.2s ease,
      opacity 0.2s ease,
      visibility 0.2s ease;
  }

  .framex-navbar-menu a {
    padding: 12px 8px;
  }

  .framex-navbar-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }

  .framex-navbar-menu.active {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .framex-navbar-menu,
  .framex-navbar-burger,
  .framex-navbar-burger::before,
  .framex-navbar-burger::after,
  .framex-navbar-menu a::after {
    transition: none;
  }
}

/* fin NAVBAR ================================================== */
/* SIDEBAR ===================================================== */
.framex-sidebar {
  width: 260px;
  height: 100%;
  background: var(--framex-color-bg-white);
  border-right: 1px solid var(--framex-color-bg-grey-1);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

/*Variante fixed*/
.framex-sidebar-fixed {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
}

/*groupes*/
.framex-sidebar-group {
  padding: 24px 20px 0;
}

.framex-sidebar-title {
  margin: 0 0 12px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--framex-color-text-grey);
}

/*Navigation*/
.framex-sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.framex-sidebar-menu li {
  margin: 2px 0;
}

.framex-sidebar-menu a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--framex-color-text-black-2);
  font-size: 0.9rem;
  transition:
    background 0.2s,
    color 0.2s;
}

.framex-sidebar-menu a:hover,
.framex-sidebar-menu a.active {
  background: var(--framex-color-bg-white-4);
}

.framex-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 999;
}

.framex-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.framex-sidebar-toggle {
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  display: none;
}

.framex-sidebar-toggle span {
  position: absolute;
  left: 8px;
  width: 26px;
  height: 2px;
  background: var(--framex-color-text-black-2);
  border-radius: 99px;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease,
    top 0.25s ease;
}

.framex-sidebar-toggle span:nth-child(1) {
  top: 12px;
}

.framex-sidebar-toggle span:nth-child(2) {
  top: 20px;
}

.framex-sidebar-toggle span:nth-child(3) {
  top: 28px;
}

.framex-sidebar-toggle.active span:nth-child(1) {
  top: 20px;
  transform: rotate(45deg);
}

.framex-sidebar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.framex-sidebar-toggle.active span:nth-child(3) {
  top: 20px;
  transform: rotate(-45deg);
}

@media (min-width: 992px) {
  .framex-sidebar {
    position: sticky;
    top: 0;
    transform: none !important;
  }

  .framex-sidebar-overlay {
    display: none;
  }
}

@media (max-width: 991px) {
  .framex-sidebar-toggle {
    display: block;
  }

  .framex-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  .framex-sidebar-open {
    transform: translateX(0);
  }
}
/*Accordéon*/
.framex-sidebar-accordion {
  margin: 4px 0;
}

.framex-sidebar-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  transition:
    background 0.2s,
    color 0.2s;
}

.framex-sidebar-accordion-trigger:hover {
  background-color: var(--framex-color-bg-grey);
}

.framex-sidebar-accordion-trigger .icon {
  transition: transform 0.25s ease;
}

.framex-sidebar-accordion.active .framex-sidebar-accordion-trigger .icon {
  transform: rotate(180deg);
}

/*Accordéon animation*/
.framex-sidebar-accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.framex-sidebar-accordion-inner {
  overflow: hidden;
}

.framex-sidebar-accordion.active .framex-sidebar-accordion-content {
  grid-template-rows: 1fr;
}

/*Accordéon sous-menu*/
.framex-sidebar-accordion-content {
  margin-left: 14px;
  border-left: 1px solid var(--framex-color-bg-white-3);
}

.framex-sidebar-accordion-content a {
  padding: 1px 12px;
  color: var(--framex-color-text-black-2);
  font-size: 0.9rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: 38px;
  border-radius: 8px;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.framex-sidebar-accordion-content a:hover {
  background: var(--framex-color-bg-grey);
  color: var(--framex-color-text-black-2);
}

.framex-sidebar-accordion-content a.active {
  background: var(--framex-color-bg-grey);
  color: var(--framex-color-text-black-2);
  font-weight: 600;
}

/* fin SIDEBAR ================================================= */
/* Bloc de sens ================================================ */
.framex-gloss-block {
  padding: 15px;
  border-radius: 8px;
  font-family: var(--framex-font-sans);
}

.framex-frame-block {
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--framex-color-bg-grey-2);
  font-family: var(--framex-font-sans);
}

.framex-gloss-block-title {
  color: inherit;
  font-size: 1rem;
  font-weight: 600;
}

.framex-gloss-block-text {
  font-size: 0.8rem;
  font-weight: 500;
}

.framex-frame-block-title {
  color: var(--framex-color-text-black);
  font-size: 1.2rem;
  font-weight: 500;
}

.framex-frame-block-text {
  color: var(--framex-color-text-grey);
  font-size: 1rem;
  font-weight: 300;
}

/* fin Bloc de sens ============================================ */
/* BUTTONS ===================================================== */
/*Boutons switch*/
.framex-buttons-switch {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  width: auto;
  background: transparent;
  height: 40px;
  border-radius: 30px;
  overflow: hidden;
  /*padding: 2px;*/
  --switch-count: 2;
  --switch-index: 0;
  --switch-hover-index: var(--switch-index);
}

.framex-buttons-switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: calc(
    2px + ((100% - 4px) / var(--switch-count)) * var(--switch-hover-index)
  );
  width: calc((100% - 4px) / var(--switch-count));
  height: calc(100% - 4px);
  background: var(--framex-color-primary);
  border-radius: 30px;
  transition:
    left 0.25s ease,
    width 0.25s ease;
  z-index: 1;
}

.framex-buttons-switch a {
  position: relative;
  z-index: 2;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 20px;
  text-align: center;
  height: 40px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--framex-color-primary);
  transition: color 0.25s ease;
  white-space: nowrap;
}

.framex-buttons-switch a.active,
.framex-buttons-switch a.is-switch-preview {
  color: var(--framex-color-text-white);
}

.framex-buttons-switch:has(a.is-switch-preview)
  a.active:not(.is-switch-preview) {
  color: var(--framex-color-primary);
}

@media (min-width: 768px) and (max-width: 1199px) {
  .framex-buttons-switch {
    display: flex;
    width: 100%;
    max-width: max-content;
    overflow-x: auto;
    white-space: nowrap;
    padding: 2px;
    gap: 4px;
    scrollbar-width: thin;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    -webkit-user-select: none;
  }

  /* On désactive le slider global */
  .framex-buttons-switch::before {
    display: none;
  }

  .framex-buttons-switch a {
    flex: 0 0 auto;
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 30px;
    background: transparent;
    color: var(--framex-color-primary);
    transition: all 0.25s ease;
  }

  .framex-buttons-switch a.active,
  .framex-buttons-switch a.is-switch-preview {
    background: var(--framex-color-primary);
    color: var(--framex-color-text-white);
  }

  .framex-buttons-switch:has(a.is-switch-preview)
    a.active:not(.is-switch-preview) {
    background: transparent;
    color: var(--framex-color-primary);
  }
}

@media (max-width: 767px) {
  .framex-buttons-switch {
    display: flex;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 2px;
    gap: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }

  .framex-buttons-switch::-webkit-scrollbar {
    display: none;
  }

  /* On désactive le slider global */
  .framex-buttons-switch::before {
    display: none;
  }

  .framex-buttons-switch a {
    flex: 0 0 auto;
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 30px;
    background: transparent;
    color: var(--framex-color-primary);
    transition: all 0.25s ease;
  }

  .framex-buttons-switch a.active {
    background: var(--framex-color-primary);
    color: var(--framex-color-text-white);
  }
}
/*fin Boutons switch*/

a:has(.framex-button),
a:has(.framex-button-small),
a:has(.framex-button-large),
a:has(.framex-button-icon) {
  user-select: none;
  outline: none;
}

.framex-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 15px;
}

.framex-button,
.framex-button-small,
.framex-button-large,
.framex-button-icon {
  display: inline-block;
  text-decoration: none;
  height: 40px;
  padding-left: 30px;
  padding-right: 30px;
  text-align: center;
  vertical-align: middle;
  font-weight: 600;
  cursor: pointer;
  -webkit-user-select: none;
  border: 1px solid;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: 0.3s;
  outline: none;
  position: relative;
}

.framex-button-small {
  font-size: 0.8rem;
  height: 30px;
  padding-left: 15px;
  padding-right: 15px;
}

.framex-button-large {
  font-size: 1rem;
  height: 45px;
}

.framex-button-primary {
  border-color: var(--framex-color-primary);
  background-color: var(--framex-color-primary);
  color: white;
}

.framex-button-secondary {
  border-color: var(--framex-color-primary);
  background-color: transparent;
  color: var(--framex-color-primary);
}

.framex-button-primary-white {
  border-color: white;
  background-color: white;
  color: black;
}

.framex-button-secondary-white {
  border-color: white;
  background-color: transparent;
  color: white;
}

.framex-button-primary-black {
  border-color: black;
  background-color: black;
  color: white;
}

.framex-button-secondary-black {
  border-color: black;
  background-color: transparent;
  color: black;
}

.framex-button-primary-light {
  border-color: var(--framex-color-bg-white);
  background-color: var(--framex-color-bg-white);
  color: var(--framex-color-text-black);
}

.framex-button-secondary-light {
  border-color: var(--framex-color-bg-white);
  background-color: transparent;
  color: var(--framex-color-text-white);
}

.framex-button-primary-dark {
  border-color: var(--framex-color-bg-black);
  background-color: var(--framex-color-bg-black);
  color: var(--framex-color-text-white);
}

.framex-button-secondary-dark {
  border-color: var(--framex-color-bg-black);
  background-color: transparent;
  color: var(--framex-color-text-black);
}

.framex-button-primary-success {
  border-color: var(--framex-color-success);
  background-color: var(--framex-color-success);
  color: white;
}

.framex-button-secondary-success {
  border-color: var(--framex-color-success);
  background-color: transparent;
  color: var(--framex-color-success);
}

.framex-button-primary-warning {
  border-color: var(--framex-color-warning-2);
  background-color: var(--framex-color-warning-2);
  color: white;
}

.framex-button-secondary-warning {
  border-color: var(--framex-color-warning-2);
  background-color: transparent;
  color: var(--framex-color-warning-2);
}

.framex-button-primary-error {
  border-color: var(--framex-color-error);
  background-color: var(--framex-color-error);
  color: white;
}

.framex-button-secondary-error {
  border-color: var(--framex-color-error);
  background-color: transparent;
  color: var(--framex-color-error);
}

.framex-button-round {
  border-radius: 30px;
}

.framex-button-round:is(.framex-button-small) {
  border-radius: 15px;
}

.framex-button-icon:is(.framex-button-icon-before),
.framex-button-icon:is(.framex-button-icon-after) {
  position: relative;
}

.framex-button-icon:is(.framex-button-icon-before) {
  padding-left: 0px;
  padding-right: 30px;
  padding-top: 0;
  padding-bottom: 0;
}
.framex-button-icon:is(.framex-button-icon-after) {
  padding-left: 30px;
  padding-right: 0px;
  padding-top: 0;
  padding-bottom: 0;
}
.framex-button-icon:is(.framex-button-icon-before) > span,
.framex-button-icon:is(.framex-button-icon-after) > span {
  display: inline-block;
  text-align: center;
  vertical-align: middle;
  border: 1px solid;
  height: 100%;
  padding: 0px 10px;
  align-items: center;
  align-content: center;
}

.framex-button-icon:is(.framex-button-primary) > span {
  border-color: white;
  background-color: white;
  color: var(--framex-color-primary);
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-secondary) > span {
  border-color: var(--framex-color-primary);
  background-color: var(--framex-color-primary);
  color: white;
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-primary-white) > span {
  border-color: var(--framex-color-bg-grey);
  background-color: var(--framex-color-bg-grey);
  color: var(--framex-color-text-black);
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-secondary-white) > span {
  border-color: white;
  background-color: white;
  color: black;
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-primary-black) > span {
  border-color: white;
  background-color: white;
  color: black;
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-secondary-black) > span {
  border-color: black;
  background-color: black;
  color: white;
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-primary-light) > span {
  border-color: var(--framex-color-bg-grey);
  background-color: var(--framex-color-bg-grey);
  color: var(--framex-color-text-black);
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-secondary-light) > span {
  border-color: var(--framex-color-bg-white);
  background-color: var(--framex-color-bg-white);
  color: var(--framex-color-text-black);
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-primary-dark) > span {
  border-color: var(--framex-color-bg-white);
  background-color: var(--framex-color-bg-white);
  color: var(--framex-color-text-black);
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-secondary-dark) > span {
  border-color: var(--framex-color-bg-black);
  background-color: var(--framex-color-bg-black);
  color: var(--framex-color-text-white);
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-primary-success) > span {
  border-color: white;
  background-color: white;
  color: var(--framex-color-success);
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-secondary-success) > span {
  border-color: var(--framex-color-success);
  background-color: var(--framex-color-success);
  color: white;
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-primary-warning) > span {
  border-color: white;
  background-color: white;
  color: var(--framex-color-warning-2);
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-secondary-warning) > span {
  border-color: var(--framex-color-warning-2);
  background-color: var(--framex-color-warning-2);
  color: white;
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-primary-error) > span {
  border-color: white;
  background-color: white;
  color: var(--framex-color-error);
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-secondary-error) > span {
  border-color: var(--framex-color-error);
  background-color: var(--framex-color-error);
  color: white;
  transition: 0.3s;
}

.framex-button-icon:is(.framex-button-icon-before) > span {
  border-radius: 3px 0px 0px 3px;
  margin-right: 10px;
}
.framex-button-icon:is(.framex-button-icon-after) > span {
  border-radius: 0px 3px 3px 0;
  margin-left: 10px;
}

.framex-button-icon:is(.framex-button-round) > span {
  border-radius: 30px;
  border: none;
  aspect-ratio: 1/1;
}

.framex-button-arrow-after {
  padding-right: 40px;
}

.framex-button-arrow-before {
  padding-left: 40px;
}

.framex-button-arrow-after > span {
  position: absolute;
  right: 17px;
  transition: 0.3s;
}

.framex-button-arrow-before > span {
  position: absolute;
  left: 17px;
  transition: 0.3s;
}

.framex-button-primary:hover,
.framex-button-secondary:hover,
.framex-button-primary-white:hover,
.framex-button-secondary-white:hover,
.framex-button-primary-black:hover,
.framex-button-secondary-black:hover,
.framex-button-primary-light:hover,
.framex-button-secondary-light:hover,
.framex-button-primary-dark:hover,
.framex-button-secondary-dark:hover,
.framex-button-primary-success:hover,
.framex-button-secondary-success:hover,
.framex-button-primary-warning:hover,
.framex-button-secondary-warning:hover,
.framex-button-primary-error:hover,
.framex-button-secondary-error:hover {
  scale: 1.05;
}

.framex-button-primary:hover,
.framex-button-secondary:hover,
.framex-button-primary-white:hover,
.framex-button-secondary-white:hover,
.framex-button-primary-black:hover,
.framex-button-secondary-black:hover,
.framex-button-primary-light:hover,
.framex-button-secondary-light:hover,
.framex-button-primary-dark:hover,
.framex-button-secondary-dark:hover {
  border-color: var(--framex-color-primary-2);
  background-color: var(--framex-color-primary-2);
  color: white;
}
.framex-button-primary-success:hover,
.framex-button-secondary-success:hover {
  border-color: var(--framex-color-success-2);
  background-color: var(--framex-color-success-2);
  color: white;
}
.framex-button-primary-warning:hover,
.framex-button-secondary-warning:hover {
  border-color: var(--framex-color-warning-3);
  background-color: var(--framex-color-warning-3);
  color: white;
}

.framex-button-primary-error:hover,
.framex-button-secondary-error:hover {
  border-color: var(--framex-color-error-2);
  background-color: var(--framex-color-error-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-primary) > span {
  border-color: var(--framex-color-primary-2);
  background-color: var(--framex-color-primary-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-secondary) > span {
  border-color: var(--framex-color-primary-2);
  background-color: var(--framex-color-primary-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-primary-white) > span {
  border-color: var(--framex-color-primary-2);
  background-color: var(--framex-color-primary-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-secondary-white) > span {
  border-color: var(--framex-color-primary-2);
  background-color: var(--framex-color-primary-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-primary-black) > span {
  border-color: var(--framex-color-primary-2);
  background-color: var(--framex-color-primary-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-secondary-black) > span {
  border-color: var(--framex-color-primary-2);
  background-color: var(--framex-color-primary-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-primary-light) > span {
  border-color: var(--framex-color-primary-2);
  background-color: var(--framex-color-primary-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-secondary-light) > span {
  border-color: var(--framex-color-primary-2);
  background-color: var(--framex-color-primary-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-primary-dark) > span {
  border-color: var(--framex-color-primary-2);
  background-color: var(--framex-color-primary-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-secondary-dark) > span {
  border-color: var(--framex-color-primary-2);
  background-color: var(--framex-color-primary-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-primary-success) > span {
  border-color: var(--framex-color-success-2);
  background-color: var(--framex-color-success-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-secondary-success) > span {
  border-color: var(--framex-color-success-2);
  background-color: var(--framex-color-success-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-primary-warning) > span {
  border-color: var(--framex-color-warning-3);
  background-color: var(--framex-color-warning-3);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-secondary-warning) > span {
  border-color: var(--framex-color-warning-3);
  background-color: var(--framex-color-warning-3);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-primary-error) > span {
  border-color: var(--framex-color-error-2);
  background-color: var(--framex-color-error-2);
  color: white;
}

.framex-button-icon:hover:is(.framex-button-secondary-error) > span {
  border-color: var(--framex-color-error-2);
  background-color: var(--framex-color-error-2);
  color: white;
}

.framex-button-arrow-after:hover,
.framex-button-arrow-before:hover {
  scale: 1;
}

.framex-button-arrow-after:hover > span {
  right: 15px;
}

.framex-button-arrow-before:hover > span {
  left: 15px;
}

.framex-button-primary:active,
.framex-button-secondary:active,
.framex-button-primary-white:active,
.framex-button-secondary-white:active,
.framex-button-primary-black:active,
.framex-button-secondary-black:active,
.framex-button-primary-light:active,
.framex-button-secondary-light:active,
.framex-button-primary-dark:active,
.framex-button-secondary-dark:active,
.framex-button-primary-success:active,
.framex-button-secondary-success:active,
.framex-button-primary-warning:active,
.framex-button-secondary-warning:active,
.framex-button-primary-error:active,
.framex-button-secondary-error:active {
  filter: brightness(1.1);
  scale: 1.05;
}

.framex-button-primary:active,
.framex-button-secondary:active,
.framex-button-primary-white:active,
.framex-button-secondary-white:active,
.framex-button-primary-black:active,
.framex-button-secondary-black:active,
.framex-button-primary-light:active,
.framex-button-secondary-light:active,
.framex-button-primary-dark:active,
.framex-button-secondary-dark:active {
  color: var(--framex-color-primary);
  outline: 2px solid var(--framex-color-primary);
  outline-offset: 1px;
}

.framex-button-primary-success:active,
.framex-button-secondary-success:active {
  color: var(--framex-color-success);
  outline: 2px solid var(--framex-color-success-2);
  outline-offset: 1px;
}

.framex-button-primary-warning:active,
.framex-button-secondary-warning:active {
  color: var(--framex-color-warning-4);
  outline: 2px solid var(--framex-color-warning-3);
  outline-offset: 1px;
}

.framex-button-primary-error:active,
.framex-button-secondary-error:active {
  color: var(--framex-color-error-3);
  outline: 2px solid var(--framex-color-error-2);
  outline-offset: 1px;
}

.framex-button-animate {
  overflow: hidden;
  padding: 0 60px;
}

.framex-button-clipboard {
  overflow: hidden;
  font-size: 1.1rem;
}

.framex-button-animate span:first-child,
.framex-button-clipboard span:first-child {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  column-gap: 5px;
  align-items: center;
}

.framex-button-animate span:last-child,
.framex-button-clipboard span:last-child {
  position: absolute;
  opacity: 0;
  transform: translateY(100%) translateX(-50%);
  display: inline-flex;
  column-gap: 5px;
  align-items: center;
}

.framex-button-animate:focus,
.framex-button-clipboard:focus {
  background-color: var(--framex-color-success);
  border-color: var(--framex-color-success);
  color: var(--framex-color-text-white);
  transition-delay: 100ms;
  transition-duration: 500ms;
}

.framex-button-animate:focus span:first-child,
.framex-button-clipboard:focus span:first-child {
  transform: translateX(-50%) translateY(-150%);
  opacity: 0;
  transition-duration: 500ms;
}

.framex-button-animate:focus span:last-child,
.framex-button-clipboard:focus span:last-child {
  transform: translateX(-50%) translateY(-50%);
  opacity: 1;
  transition-delay: 300ms;
  transition-duration: 500ms;
}

.framex-button-disabled,
.framex-button-disabled:hover,
.framex-button-disabled:active {
  cursor: not-allowed !important;
  background-color: var(--framex-color-bg-disabled) !important;
  border-color: var(--framex-color-bg-disabled) !important;
  color: var(--framex-color-text-disabled) !important;
  outline: none !important;
  scale: 1 !important;
}

.framex-button-disabled > span,
.framex-button-disabled:hover > span,
.framex-button-disabled:active > span {
  border-color: var(--framex-color-bg-disabled) !important;
  background-color: var(--framex-color-bg-disabled) !important;
  color: var(--framex-color-text-disabled) !important;
}

@media (max-width: 767px) {
  .framex-buttons {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .framex-button-mobile-100 {
    width: 100%;
  }
  .framex-button-icon:is(.framex-button-mobile-100) {
    padding-left: 28px;
    padding-right: 0;
  }
  .framex-button-icon:is(.framex-button-mobile-100) {
    padding-right: 28px;
    padding-left: 0;
  }
  .framex-button-icon:is(.framex-button-mobile-100) > span {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
  }
  .framex-button-icon:is(.framex-button-mobile-100) > span {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
  }
}

/* fin BUTTONS ================================================= */

/* Code & bloc de codes ======================================== */
.framex-code {
  display: inline-block;
  width: fit-content;
  padding: 0 5px;
  border-radius: 4px;
  background-color: #111827;
  color: #f8f8f2;
  font-size: 0.8rem;
}

.framex-code-container {
  position: relative;
  width: 100%;
  margin-inline: auto;
}

/* Utiliser data-semantic uniquement sur .framex-code-container */
.framex-code-container[data-semantic] {
  padding-top: 1.75rem;
}

.framex-code-container[data-semantic]::before {
  content: attr(data-semantic);
  position: absolute;
  top: 0;
  left: 0;
  color: var(--framex-color-text-grey);
  font-family: var(--framex-font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.framex-code-block {
  overflow: auto;
  border-radius: 8px;
  background-color: #111827;
  color: #f8f8f2;
  font-size: 0.8rem;
  line-height: 1.5;
}

.framex-code-block > code {
  display: block;
  line-height: 20px;
}

/* Blocs avec numérotation des lignes */
.framex-code-block-lines {
  counter-reset: line;
  white-space-collapse: collapse;
}

.framex-code-block-lines > code {
  padding-block: 15px;
  padding-right: 15px;
  overflow: visible;
}

.framex-code-block-lines .framex-code-line {
  position: relative;
  display: block;
  min-height: 20px;
  padding-left: 3.5em;
  line-height: 20px;
}

.framex-code-block-lines .framex-code-line::before {
  content: counter(line);
  position: absolute;
  top: 0;
  left: 0;
  width: 2.5em;
  padding-right: 0.5em;
  color: #7a7a7a;
  font-size: 0.8rem;
  text-align: right;
  counter-increment: line;
  pointer-events: none;
  user-select: none;
}

.framex-code-block-lines .framex-code-line:hover::before {
  color: #fff;
}

/* Coloration syntaxique */
.framex-code-color-balise {
  color: rgb(50, 179, 205);
}

.framex-code-color-function {
  color: rgb(215, 189, 94);
}

.framex-code-color-attribute {
  color: rgb(179, 241, 255);
}

.framex-code-color-comment {
  color: limegreen;
}

.framex-code-color-default {
  color: #fe8cc5;
}

.framex-code-green {
  color: #4ade80;
}

@media (max-width: 768px) {
  .framex-code-block {
    font-size: 0.75rem;
  }
}
/* fin Code & bloc de codes ==================================== */
/* Accordéons ================================================== */
.framex-accordion {
  position: relative;
  background: var(--framex-color-bg-white);
  color: var(--framex-color-text-black);
  border: 1px solid var(--framex-color-bg-white-4);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.framex-accordion-header {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 15px 20px;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.framex-accordion-info {
  flex: 1;
}

.framex-accordion-title {
  margin: 0;
  font-weight: 600;
}

.framex-accordion-subtitle {
  margin: 0;
  opacity: 0.7;
  font-size: 0.875rem;
}

.framex-accordion-btn,
.framex-accordion-btn-plus {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0;
  transition: transform 0.3s ease;
}

.framex-accordion-header-reverse {
  flex-direction: row;
}

.framex-accordion-header-reverse .framex-accordion-btn,
.framex-accordion-header-reverse .framex-accordion-btn-plus {
  order: -1;
}

.framex-accordion-header-reverse .framex-accordion-info {
  flex: 1;
}

.framex-accordion-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 20px;
  transition:
    max-height 0.3s ease,
    opacity 0.2s ease,
    padding 0.3s ease;
}

.framex-accordion.active .framex-accordion-content {
  max-height: 500px;
  opacity: 1;
  padding: 0 20px 20px;
}

.framex-accordion.active .framex-accordion-btn {
  transform: rotate(180deg);
}

.framex-accordion.active .framex-accordion-btn-plus {
  transform: rotate(45deg);
}
/* fin Accordéons ============================================== */
/* Tableaux ==================================================== */
.framex-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

/* VARIABLES */
.framex-table {
  --framex-table-header-background: var(--framex-color-bg-grey-blue);
  --framex-table-header-color: var(--framex-color-text-grey-2);
  --framex-table-cell-background: var(--framex-color-bg-white);
  --framex-table-cell-color: var(--framex-color-text-black);
  --framex-table-hover-background: var(--framex-color-bg-black-5);
  --framex-table-hover-color: var(--framex-color-text-white);
  --framex-table-border-color: var(--framex-color-bg-grey-2);
  --framex-table-striped-background: var(--framex-color-bg-white-3);

  --framex-table-cell-padding-y: 1rem;
  --framex-table-cell-padding-x: 1rem;

  width: 100%;
  min-width: max-content;

  border-collapse: separate;
  border-spacing: 0;
}

/* CELLS */
.framex-table th,
.framex-table td {
  padding: var(--framex-table-cell-padding-y) var(--framex-table-cell-padding-x);

  text-align: left;
  vertical-align: middle;
  white-space: nowrap;

  background: var(--framex-table-cell-background);
  color: var(--framex-table-cell-color);
}

/* HEADER */
.framex-table thead th {
  position: sticky;
  top: 0;

  background: var(--framex-table-header-background);
  color: var(--framex-table-header-color);

  z-index: 20;
}

/* STICKY COLUMNS */
.framex-table-sticky-start,
.framex-table-sticky-end {
  position: sticky;
  z-index: 30;
}

.framex-table-sticky-start {
  left: var(--framex-sticky-left, 0);

  background: var(--framex-table-cell-background);
  color: var(--framex-table-cell-color);

  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.05);
}

.framex-table-sticky-end {
  right: var(--framex-sticky-right, 0);

  background: var(--framex-table-cell-background);
  color: var(--framex-table-cell-color);

  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.05);
}

/* HEADER + STICKY */
.framex-table thead .framex-table-sticky-start,
.framex-table thead .framex-table-sticky-end {
  background: var(--framex-table-header-background);
  color: var(--framex-table-header-color);
  z-index: 40;
}

/* DEFAULT */
.framex-table--default {
  border: 1px solid var(--framex-table-border-color);
}

/* STRIPED */
.framex-table--striped tbody tr:nth-child(odd) {
  --framex-table-cell-background: var(--framex-color-bg-white);
}

.framex-table--striped tbody tr:nth-child(even) {
  --framex-table-cell-background: var(--framex-table-striped-background);
}

.framex-table--striped tbody td {
  background: var(--framex-table-cell-background);
  color: var(--framex-table-cell-color);
}

/* HOVER */
.framex-table--hover tbody tr:hover td {
  background: var(--framex-table-hover-background);
  color: var(--framex-table-hover-color);
  transition: background 0.15s ease;
}

/* Sticky compatible hover */
.framex-table--hover tbody tr:hover {
  --framex-table-cell-background: var(--framex-table-hover-background);
  color: var(--framex-table-hover-color);
}

/* BORDERS */
.framex-table--bordered th,
.framex-table--bordered td {
  border: 1px solid var(--framex-table-border-color);
}

/* ROW DIVIDERS */
.framex-table--rows th,
.framex-table--rows td {
  border-bottom: 1px solid var(--framex-table-border-color);
}

/* COLUMN DIVIDERS  */
.framex-table--columns th,
.framex-table--columns td {
  border-right: 1px solid var(--framex-table-border-color);
}

.framex-table--columns th:last-child,
.framex-table--columns td:last-child {
  border-right: none;
}

/* COMPACT */
.framex-table--compact {
  --framex-table-cell-padding-y: 0.5rem;
  --framex-table-cell-padding-x: 0.75rem;
}

/* LARGE */
.framex-table--large {
  --framex-table-cell-padding-y: 1.5rem;
  --framex-table-cell-padding-x: 1.5rem;
}

/* ALIGNMENTS */
.framex-table--center th,
.framex-table--center td {
  text-align: center;
}

.framex-table--right th,
.framex-table--right td {
  text-align: right;
}

/* NO WRAP */
.framex-table--nowrap {
  min-width: max-content;
}

.framex-table--nowrap th,
.framex-table--nowrap td {
  white-space: nowrap;
  word-break: normal;
}

/* WRAP */
.framex-table--wrap {
  table-layout: fixed;
  min-width: 100%;
}

.framex-table--wrap th,
.framex-table--wrap td {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* MOBILE */
@media (max-width: 768px) {
  .framex-table {
    --framex-table-cell-padding-y: 0.75rem;
    --framex-table-cell-padding-x: 0.75rem;
  }
}
/* fin Tableaux ================================================ */
/* Navigation par onglets ====================================== */
.framex-tabs-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--framex-color-bg-grey-2);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.framex-tabs-nav::-webkit-scrollbar {
  display: none;
}

.framex-tabs-nav > * {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.85rem 0;
  border: none;
  background: none;
  color: var(--framex-color-text-grey);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
}

.framex-tabs-nav > *:hover {
  color: var(--framex-color-text-black);
}

.framex-tabs-nav > *.active {
  color: var(--framex-color-primary);
}

.framex-tabs-nav > *.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: currentColor;
}

/*listes ul > li*/
.framex-tabs-list {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--framex-color-bg-grey-2);
  scrollbar-width: none;
}

.framex-tabs-list::-webkit-scrollbar {
  display: none;
}

.framex-tabs-list li {
  position: relative;
  flex-shrink: 0;
  padding: 0.85rem 0;
  color: var(--framex-color-text-grey);
  cursor: pointer;
  white-space: nowrap;
}

.framex-tabs-list li:hover {
  color: var(--framex-color-text-black);
}

.framex-tabs-list li.active {
  color: var(--framex-color-primary);
}

.framex-tabs-list li.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: currentColor;
}

/*panel*/
.framex-tabs-panel {
  display: none;
}

.framex-tabs-panel.active {
  display: block;
}
/* fin Navigation par onglets ================================== */
/* Modales ===================================================== */
/* BODY LOCK */
body.framex-modal-open {
  overflow: hidden;
}

/* MODAL  */
.framex-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  visibility: hidden;
  pointer-events: none;
}

.framex-modal--active {
  visibility: visible;
  pointer-events: auto;
}

/* OVERLAY */
.framex-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.framex-modal--active .framex-modal__overlay {
  opacity: 1;
}

/* DIALOG */
.framex-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 700px;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  background: var(--framex-color-bg-white-4);
  color: var(--framex-color-text-black);
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  z-index: 2;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.framex-modal--active .framex-modal__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* CONTENT */
.framex-modal__content {
  padding: 2rem;
}

/* CLOSE BUTTON */
.framex-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.framex-modal__close::before,
.framex-modal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.framex-modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.framex-modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.framex-modal:not(.framex-modal--active) .framex-modal__dialog button {
  transition: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .framex-modal {
    align-items: flex-end;
    padding: 0;
  }

  .framex-modal__dialog {
    max-width: none;
    width: 100%;
    max-height: 90vh;
    border-radius: 1.25rem 1.25rem 0 0;
  }

  .framex-modal__content {
    padding: 1.5rem;
  }
}
/* Fin Modales ================================================= */
/* Carsousels ================================================== */
.framex-carousel {
  --framex-carousel-visible: 1;
  --framex-carousel-gap: 24px;
  --framex-carousel-button-size: 44px;

  position: relative;
  width: 100%;
  min-width: 0;
}

.framex-carousel__viewport {
  width: 100%;
  overflow: hidden;
}

.framex-carousel__track {
  display: flex;
  gap: var(--framex-carousel-gap);
  width: 100%;
  transition: transform 0.35s ease;
  will-change: transform;
}

.framex-carousel__item {
  flex: 0 0
    calc(
      (
          100% -
            ((var(--framex-carousel-visible) - 1) * var(--framex-carousel-gap))
        ) /
        var(--framex-carousel-visible)
    );
  min-width: 0;
  box-sizing: border-box;
}

.framex-carousel__content {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid var(--framex-color-bg-grey-2);
  border-radius: 12px;
  background: var(--framex-color-bg-white);
}

.framex-carousel__button {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: var(--framex-carousel-button-size);
  height: var(--framex-carousel-button-size);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--framex-color-bg-white);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.framex-carousel__button:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.framex-carousel__button:active {
  transform: translateY(-50%) scale(0.95);
}

.framex-carousel__button[data-framex-carousel="btn-left"] {
  left: -22px;
}

.framex-carousel__button[data-framex-carousel="btn-right"] {
  right: -22px;
}

.framex-carousel__icon {
  font-size: 28px;
  line-height: 1;
}

@media (max-width: 991px) {
  .framex-carousel__button[data-framex-carousel="btn-left"] {
    left: -18px;
  }

  .framex-carousel__button[data-framex-carousel="btn-right"] {
    right: -18px;
  }
}

@media (max-width: 767px) {
  .framex-carousel__button {
    width: 38px;
    height: 38px;
  }

  .framex-carousel__button[data-framex-carousel="btn-left"] {
    left: -12px;
  }

  .framex-carousel__button[data-framex-carousel="btn-right"] {
    right: -12px;
  }
}

@media (max-width: 575px) {
  .framex-carousel {
    --framex-carousel-gap: 16px;
  }

  .framex-carousel__button {
    width: 36px;
    height: 36px;
  }

  .framex-carousel__button[data-framex-carousel="btn-left"] {
    left: -8px;
  }

  .framex-carousel__button[data-framex-carousel="btn-right"] {
    right: -8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .framex-carousel__track,
  .framex-carousel__button {
    transition: none;
  }
}
/* Fin Carsousels ============================================== */
/* Champs de formulaire ======================================== */
/* Conteneur */
.framex-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
  color: var(--framex-color-text-black-2);
}

.framex-label {
  display: block;
  max-width: 100%;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.framex-required {
  color: var(--framex-color-error);
}

.framex-help,
.framex-error,
.framex-success,
.framex-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.framex-help {
  color: var(--framex-color-text-grey);
}

.framex-error {
  color: var(--framex-color-error);
}

.framex-success {
  color: var(--framex-color-success);
}

.framex-warning {
  color: var(--framex-color-warning-2);
}

.framex-help [data-icon],
.framex-error [data-icon],
.framex-success [data-icon],
.framex-warning [data-icon] {
  flex: 0 0 auto;
  margin-top: 3px;
}

/* Champ de base */

.framex-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 10px 15px;

  border: 1px solid var(--framex-color-bg-grey-2);
  border-radius: 8px;

  background: var(--framex-color-bg-white-2);
  color: var(--framex-color-text-black-2);

  font: inherit;
  font-size: 1rem;
  line-height: 1.4;

  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.framex-input::placeholder {
  color: var(--framex-color-text-grey);
  opacity: 1;
}

.framex-input:hover:not(:disabled):not(:read-only) {
  border-color: var(--framex-color-primary);
}

.framex-input:focus {
  outline: none;
}

.framex-input:focus-visible,
.framex-select:focus-visible,
.framex-input-action:focus-visible {
  outline: 3px solid var(--framex-color-primary);
  outline-offset: 2px;
}

.framex-input:focus-visible {
  border-color: var(--framex-color-primary);
  box-shadow: 0 0 0 1px var(--framex-color-primary);
}

/* Groupe : input + addon + select + actions */

.framex-input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  border-radius: 8px;
  isolation: isolate;
}

.framex-input-group > .framex-input {
  flex: 1 1 0%;
  width: 1%;
  min-width: 0;
  border-radius: 0;
}

.framex-input-group > .framex-input:first-child {
  border-radius: 8px 0 0 8px;
}

.framex-input-group > .framex-input:last-child {
  border-radius: 0 8px 8px 0;
}

.framex-input-group > .framex-input:only-child {
  border-radius: 8px;
}

/* Addon fixe : icône, unité ou texte */

.framex-addon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 46px;
  max-width: 45%;
  padding: 0 13px;

  border: 1px solid var(--framex-color-bg-grey-2);
  background: var(--framex-color-bg-grey-2);
  color: var(--framex-color-text-grey);

  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.framex-input-group > .framex-addon:first-child {
  border-right: 0;
  border-radius: 8px 0 0 8px;
}

.framex-input-group > .framex-addon:last-child {
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.framex-addon [data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.framex-addon-highlighting {
  background-color: var(--framex-color-error);
  color: var(--framex-color-white);
}

/* Select intégré */

/* Select natif Framex */
.framex-select {
  position: relative;
  z-index: 1;
  display: block;
  box-sizing: border-box;
  min-height: 46px;
  min-width: 0;
  max-width: 100%;
  padding: 10px 36px 10px 12px;

  border: 1px solid var(--framex-color-bg-grey-2);
  border-radius: 8px;

  background-color: var(--framex-color-bg-white-2);
  color: var(--framex-color-text-grey);

  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
  pointer-events: auto;

  appearance: none;
  -webkit-appearance: none;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M18.7071 9.70703C19.0976 9.3165 19.0976 8.68348 18.7071 8.29297C18.3166 7.90257 17.6835 7.90251 17.2931 8.29297L12.0001 13.5859L6.70712 8.29297C6.31659 7.90251 5.68356 7.90247 5.29306 8.29297C4.90257 8.68347 4.90261 9.31651 5.29306 9.70703L11.2931 15.707C11.6592 16.0731 12.2382 16.0957 12.6309 15.7754L12.7071 15.707L18.7071 9.70703Z' fill='%230a0a12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
}

/* Select intégré dans un groupe */
.framex-select-addon {
  position: relative;
  z-index: 1;
  flex: 0 1 auto;
  width: auto;
  max-width: 48%;
  min-width: 0;
  border-radius: 0;
  background-color: var(--framex-color-bg-grey-2);
  pointer-events: auto;
}

/* Focus clavier visible */
.framex-select:focus-visible {
  outline: 3px solid var(--framex-color-primary);
  outline-offset: 2px;
}

/* Select désactivé */
.framex-select:disabled {
  cursor: not-allowed;
  pointer-events: none;
}

.framex-input-group > .framex-select-addon:first-child {
  border-right: 0;
  border-radius: 8px 0 0 8px;
}

.framex-input-group > .framex-select-addon:last-child {
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.framex-input-group > .framex-select-addon:focus-visible {
  position: relative;
  z-index: 1;
}

/* Select simple : largeur complète */
.framex-field > .framex-select {
  width: 100%;
  max-width: 100%;
}

/* Option placeholder */
.framex-select:required:invalid {
  color: var(--framex-color-text-disabled);
}

/* Options disponibles */
.framex-select option {
  color: var(--framex-color-text-black-2);
  background: var(--framex-color-bg-white-2);
}

/* Focus clavier */
.framex-select:focus-visible {
  outline: 3px solid var(--framex-color-primary);
  outline-offset: 2px;
}

/* Boutons d'action : afficher / effacer */

.framex-input-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 46px;
  padding: 0 12px;

  border: 1px solid var(--framex-color-bg-grey-2);
  border-left: 0;
  border-radius: 0 8px 8px 0;

  /*background: var(--framex-color-bg-grey-2);
  color: var(--framex-color-text-black-2);*/
  background: var(--framex-color-primary);
  color: var(--framex-color-text-white);
  font: inherit;
  cursor: pointer;
  transition: 0.3s;
}

.framex-input-action:hover {
  /*background: var(--framex-color-bg-grey-2);*/
  background: var(--framex-color-primary-2);
}

.framex-input-action:focus-visible {
  position: relative;
  z-index: 1;
}

.framex-input-action[hidden] {
  display: none;
}

/* Textarea */

.framex-textarea {
  min-height: 112px;
  resize: vertical;
}

/* États de validation */

.framex-field[data-state="success"] .framex-input,
.framex-field[data-state="success"] .framex-select {
  border-color: var(--framex-color-success);
}

.framex-field[data-state="success"] .framex-input:focus-visible {
  box-shadow: 0 0 0 1px var(--framex-color-success);
}

.framex-field[data-state="warning"] .framex-input,
.framex-field[data-state="warning"] .framex-select {
  border-color: var(--framex-color-warning-2);
}

.framex-field[data-state="warning"] .framex-input:focus-visible {
  box-shadow: 0 0 0 1px var(--framex-color-warning-2);
}

.framex-field[data-state="error"] .framex-input,
.framex-field[data-state="error"] .framex-select {
  border-color: var(--framex-color-error);
}

.framex-field[data-state="error"] .framex-input:focus-visible {
  box-shadow: 0 0 0 1px var(--framex-color-error);
}

/* Les groupes conservent un contour cohérent */

.framex-field[data-state] .framex-input-group > .framex-input,
.framex-field[data-state] .framex-input-group > .framex-select {
  border-color: var(--framex-color-bg-grey-2);
}

.framex-field[data-state="success"] .framex-input-group > .framex-input,
.framex-field[data-state="success"] .framex-input-group > .framex-select {
  border-color: var(--framex-color-success);
}

.framex-field[data-state="warning"] .framex-input-group > .framex-input,
.framex-field[data-state="warning"] .framex-input-group > .framex-select {
  border-color: var(--framex-color-warning-2);
}

.framex-field[data-state="error"] .framex-input-group > .framex-input,
.framex-field[data-state="error"] .framex-input-group > .framex-select {
  border-color: var(--framex-color-error);
}

/* Lecture seule */
/*
.framex-input:read-only {
  background: var(--framex-color-bg-grey-2);
  cursor: default;
}
  */

/* Désactivé */

/* Champ désactivé : aucun effet hover ou focus */
.framex-input:disabled,
.framex-select:disabled,
.framex-input-action:disabled {
  background: var(--framex-color-bg-disabled);
  color: var(--framex-color-text-disabled);
  border-color: var(--framex-color-bg-disabled);
  cursor: not-allowed;
  opacity: 1;
  box-shadow: none;
  outline: none;
}

/* Placeholder désactivé */
.framex-input:disabled::placeholder {
  color: var(--framex-color-text-disabled);
}

/* Label associé */
.framex-field:has(.framex-input:disabled) .framex-label,
.framex-field:has(.framex-select:disabled) .framex-label {
  color: var(--framex-color-text-disabled);
  cursor: not-allowed;
}

/* Addons et sélecteurs dans un groupe désactivé */
.framex-input-group:has(.framex-input:disabled) .framex-addon,
.framex-input-group:has(.framex-select:disabled) .framex-addon,
.framex-input-group:has(.framex-input:disabled) .framex-select,
.framex-input-group:has(.framex-select:disabled) .framex-select {
  background: var(--framex-color-bg-disabled);
  color: var(--framex-color-text-disabled);
  border-color: var(--framex-color-bg-disabled);
  cursor: not-allowed;
}

/* Pas de changement visuel au survol */
.framex-input:disabled:hover,
.framex-select:disabled:hover,
.framex-input-action:disabled:hover {
  border-color: var(--framex-color-bg-disabled);
  background: var(--framex-color-bg-disabled);
  box-shadow: none;
}

/* Respect des préférences de mouvement */

@media (prefers-reduced-motion: reduce) {
  .framex-input,
  .framex-select,
  .framex-input-action {
    transition: none;
  }
}

/* Adaptation aux écrans étroits */

@media (max-width: 480px) {
  .framex-field {
    gap: 5px;
  }

  .framex-input,
  .framex-select {
    font-size: 16px;
  }

  .framex-input {
    padding-inline: 11px;
  }

  .framex-addon {
    padding-inline: 10px;
  }

  .framex-select-addon {
    padding-inline: 8px;
    max-width: 44%;
    padding-right: 32px;
  }
}

/*Range*/

.framex-range {
  display: block;
  width: 100%;
  min-width: 0;
  height: 24px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}

/* Chrome, Edge et Safari */
.framex-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--framex-color-primary) 0%,
    var(--framex-color-primary) var(--framex-range-progress, 50%),
    var(--framex-color-bg-grey-2) var(--framex-range-progress, 50%),
    var(--framex-color-bg-grey-2) 100%
  );
}

.framex-range::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -7px;
  appearance: none;
  -webkit-appearance: none;
  border: 3px solid var(--framex-color-primary);
  border-radius: 50%;
  background: var(--framex-color-bg-white-2);
  box-shadow: 0 1px 4px rgb(10 10 18 / 16%);
}

/* Firefox */
.framex-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--framex-color-bg-grey-2);
}

.framex-range::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--framex-color-primary);
}

.framex-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid var(--framex-color-primary);
  border-radius: 50%;
  background: var(--framex-color-bg-white-2);
  box-shadow: 0 1px 4px rgb(10 10 18 / 16%);
}

/* Survol */
.framex-range:hover:not(:disabled)::-webkit-slider-thumb {
  box-shadow: 0 0 0 5px var(--framex-color-bg-grey-2);
}

.framex-range:hover:not(:disabled)::-moz-range-thumb {
  box-shadow: 0 0 0 5px var(--framex-color-bg-grey-2);
}

/* Focus clavier */
.framex-range:focus-visible {
  outline: 3px solid var(--framex-color-primary);
  outline-offset: 4px;
  border-radius: 999px;
}

/* Désactivé */
.framex-range:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Chrome, Edge et Safari */
.framex-range:disabled::-webkit-slider-thumb {
  border-color: var(--framex-color-text-disabled);
  box-shadow: none;
}

/* Firefox */
.framex-range:disabled::-moz-range-thumb {
  border-color: var(--framex-color-text-disabled);
  box-shadow: none;
}

/* Libellés sous le curseur */
.framex-range-scale {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--framex-color-text-grey);
  font-size: 0.75rem;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .framex-range {
    min-height: 32px;
  }
}

/* Fin Champs de formulaire ======================================== */
