/*
 * DSFR v1.0.0-rc1.0 | restricted use
 */
@charset "UTF-8";

/* ------------------------------------ *\
  TABS
\* ------------------------------------ */

.fr-tabs__tab {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
}

.fr-tabs__tab {
  overflow: hidden;
  z-index: 1;
}

.fr-tabs__tab {
  font-size: 1rem;
  line-height: 1.5rem;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
}

.fr-tabs__tab:not([class*="tabs__tab--icon-"])[class^="fr-fi-"],
.fr-tabs__tab:not([class*="tabs__tab--icon-"])[class*=" fr-fi-"] {
  flex-direction: row;
  max-width: 2.5rem;
  max-height: 2.5rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.fr-tabs__tab[class^="fr-fi-"]:not([class*="tabs__tab--icon-"])::before,
.fr-tabs__tab[class*=" fr-fi-"]:not([class*="tabs__tab--icon-"])::before {
  margin-left: 0;
  margin-right: 0.75rem;
  font-size: 1rem;
}

.fr-tabs__tab--icon-left[class^="fr-fi-"],
.fr-tabs__tab--icon-left[class*=" fr-fi-"] {
  flex-direction: row;
}

.fr-tabs__tab--icon-left[class^="fr-fi-"]::before,
.fr-tabs__tab--icon-left[class*=" fr-fi-"]::before {
  margin-left: -0.25rem;
  margin-right: 0.5rem;
  font-size: 1rem;
}

.fr-tabs {
  --is-list: false;
  --is-link: false;
  position: relative;
  overflow: hidden;
  margin-top: -4px;
  padding-top: 4px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  /**
    * Animation de la hauteur du panel
    */
  transition: height 0.3s;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  /**
   * ul : element srollable des boutons
   *//**
  * Tab button
  *//**
  * Tab Panel
  */
}

.fr-tabs .fr-tabs {
  margin-left: 0;
  margin-right: 0;
}

.fr-tabs::after {
  display: block;
  content: "";
  position: absolute;
  top: 2.75rem;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}

.fr-tabs__list {
  display: flex;
  align-items: flex-end;
  overflow-x: auto;
  width: 100%;
  height: 3rem;
  position: absolute;
  /**
    * overflow vertical de 4px pour le focus
    */
  margin: -4px 0;
  padding: 4px 0.5rem;
  /**
    * Reset du style par défaut du li
    */
}

.fr-tabs__list::after {
  display: block;
  content: "";
  flex: 1 1 auto;
  height: 1px;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

.fr-tabs__list > li {
  display: block;
  flex: 0 0 auto;
  margin: 0 0.5rem;
}

.fr-tabs__list > li:not(:first-child) {
  margin-left: 0;
}

.fr-tabs__list > li:not(:first-child)::before {
  display: block;
  content: "";
  position: sticky;
  top: 100%;
  width: 0.5rem;
  height: 1px;
  margin-left: -0.5rem;
}

.fr-tabs__list > li:last-child {
  padding-right: 1rem;
}

.fr-tabs__list > li:last-child::after {
  display: block;
  content: "";
  min-width: 1rem;
  margin-left: 100%;
  flex: 1 1 auto;
  position: sticky;
  top: 100%;
  width: auto;
  height: 1px;
  margin-top: -1px;
}

.fr-tabs__list > li:first-child::before {
  display: block;
  content: "";
  position: sticky;
  top: 100%;
  width: 100%;
  height: 1px;
  position: sticky;
  margin-left: -100%;
}

.fr-tabs__tab {
  --is-link: false;
  margin: 0;
  position: relative;
  overflow: visible;
  font-weight: bold;
  z-index: 1;
}

.fr-tabs__tab[aria-selected=true] {
  cursor: default;
  background: transparent;
}

.fr-tabs__tab[aria-selected=true]::after {
  display: block;
  content: "";
  position: absolute;
  top: 2px;
  right: 1px;
  bottom: 0;
  left: 1px;
  width: auto;
  height: calc(100% - 1px);
  z-index: 1;
}

.fr-tabs__panel {
  --is-link:  ;
  --is-list:  ;
  display: block;
  position: relative;
  left: 0;
  width: 100%;
  height: auto;
  padding: 1rem;
  margin-top: 2.5rem;
  margin-right: -100%;
  flex: 0 0 100%;
  transition: visibility 0.3s, transform 0.3s;
  /**
    * Les éléments non sélectionnés sont cachés et rendus innaccessibles au focus
    * Point d'attention : visibility hidden sur le panel et surcharge sur l'élément selected avec visibility visible créé des problèmes dans la gestion du focus en cas d'imbrication d'onglets
    *
    * tabs
    * └─ panel selected
    * └─ panel (visibility hidden, tabindex -1)
    *    └─ tabs
    *       └─ panel selected (visibility visible tabindex 0)
    *            ↑ ce panel est accessible alors que caché par son panel parent
    * solution : visibility hidden seulement sur les éléments non sélectionnés
    **/
}

.fr-tabs__panel:focus, .fr-tabs__panel:focus-visible {
  outline-offset: calc(-1rem + 2px);
}

.fr-tabs__panel:not(.fr-tabs__panel--selected) {
  visibility: hidden;
}

.fr-tabs {
  /**
   * ul : element srollable des boutons
   *//**
  * Tab button
  */
}

.fr-tabs::after {
  box-shadow: inset 1px -1px 0 0 var(--g300), inset -1px 0 0 var(--g300);
}

.fr-tabs__list {
  /**
    * Reset du style par défaut du li
    */
}

.fr-tabs__list::after {
  box-shadow: 0 1px 0 0 var(--g300);
}

.fr-tabs__list > li:not(:first-child)::before {
  box-shadow: 0 1px 0 0 var(--g300);
}

.fr-tabs__list > li:last-child::after {
  box-shadow: 0 1px 0 0 var(--g300);
}

.fr-tabs__list > li:first-child::before {
  box-shadow: 0 1px 0 0 var(--g300);
}

.fr-tabs__tab:not([aria-selected=true]) {
  background-color: var(--bf100-g750);
  color: var(--g700);
  box-shadow: 0 1px 0 0 var(--g300);
}

:root:not([data-fr-theme="dark" i]) .fr-tabs__tab:not([aria-selected=true]) {
  --color-hover: rgba(182, 182, 255, 0.5);
  --color-active: rgba(119, 119, 255, 0.5);
}

:root:not([data-fr-theme="dark" i]) [class*="fr-scheme-light"] .fr-tabs__tab:not([aria-selected=true]),
:root:not([data-fr-theme="dark" i]) [class*="--scheme-light-"] .fr-tabs__tab:not([aria-selected=true]) {
  --color-hover: rgba(182, 182, 255, 0.5);
  --color-active: rgba(119, 119, 255, 0.5);
}

:root:not([data-fr-theme="dark" i]) [class*="fr-scheme-dark"] .fr-tabs__tab:not([aria-selected=true]),
:root:not([data-fr-theme="dark" i]) [class*="--scheme-dark-"] .fr-tabs__tab:not([aria-selected=true]) {
  --color-hover: rgba(79, 79, 79, 0.5);
  --color-active: rgba(115, 115, 115, 0.5);
}

:root[data-fr-theme="dark" i] .fr-tabs__tab:not([aria-selected=true]) {
  --color-hover: rgba(79, 79, 79, 0.5);
  --color-active: rgba(115, 115, 115, 0.5);
}

.fr-tabs__tab:not([aria-selected=true])[disabled],
.fr-tabs__tab:not([aria-selected=true]):disabled {
  color: var(--g600-g400);
  background-color: var(--g200);
}

.fr-tabs__tab[aria-selected=true] {
  box-shadow: inset 0 0.125rem 0 0 var(--bf500);
  background-color: var(--t-plain);
  color: var(--bf500);
}

.fr-tabs__tab[aria-selected=true]:hover:not([disabled]),
.fr-tabs__tab[aria-selected=true]:hover:not(:disabled),
.fr-tabs__tab[aria-selected=true]:active:not([disabled]),
.fr-tabs__tab[aria-selected=true]:active:not(:disabled) {
  background-image: none;
}

.fr-tabs__tab[aria-selected=true]::after {
  box-shadow: -1px 0 0 0 var(--g300), 1px 0 0 0 var(--g300);
}

@media (min-width: 48em) {
  .fr-tabs {
    margin-left: 0;
    margin-right: 0;
  }

  .fr-tabs__panel {
    padding: 2rem;
  }

  .fr-tabs__panel:focus, .fr-tabs__panel:focus-visible {
    outline-offset: calc(-2rem + 2px);
  }
}

@media (hover: hover) and (pointer: fine) {
  .fr-tabs__tab:not([aria-selected=true]):not(a):not(:disabled):hover,
  a.fr-tabs__tab:not([aria-selected=true])[href]:hover {
    background-image: linear-gradient(0deg, var(--color-hover), var(--color-hover));
  }

  .fr-tabs__tab:not([aria-selected=true]):not(a):not(:disabled):active,
  a.fr-tabs__tab:not([aria-selected=true])[href]:active {
    background-image: linear-gradient(0deg, var(--color-active), var(--color-active));
  }
}
