@charset "UTF-8";
/* register these two so they can be transitioned */
/* index of previous top item during the animation
 * after another has been selected */
@property --p {
  syntax: "<number>";
  initial-value: 0;
  inherits: true;
}
/* animated index of top item from previous to current */
@property --v {
  syntax: "<number>";
  initial-value: 0;
  inherits: true;
}
.cardInformations {
  --n: 7;
  --k: 0;
  display: grid;
  /* set previous top item index to current top index
   * 0s duration delayed transition ensures switch happens
   * after the switching top item transtion */
  --p: var(--k);
  /* abs of difference between current & previous top item indices
   * 0 if not during animation,
   * 1 during animation not between two ends,
   * n - 1 > 1 (if n > 2) during animation from one end to another */
  --abs-p: abs(var(--k) - var(--p));
  /* animation from one end of the n > 2 length list to another?
   * 0 if no, 1 if yes */
  --end: clamp(0, var(--abs-p) - 1, 1);
  /* direction we're going in given by
   * sign of difference between current & previous top item indices
   * -1 backwards, 1 forwards, 0 no animation;
   * switch sign IF we're going from an end to another */
  --dir: calc((1 - 2*var(--end))*sign(var(--k) - var(--p)));
  /*  forward direction flag: 0 backwards, 1 forwards */
  --fwd: calc(.5*(1 + var(--dir)));
  /* set animated value of top item index to current top index
   * a transition ensures switch doesn't happen instantly */
  --v: var(--k);
  /* absolute value of difference between animated & previous top index */
  --abs-v: abs(var(--v) - var(--p));
  /* animation progress as a decimal value */
  --prg: calc(var(--abs-v)/(1 - var(--end) + var(--end)*(var(--n) - 1)));
  /* bigger space between the two columns (image stack & all else) */
  grid-gap: 0.5em 4em;
  grid-template: repeat(2, max-content) 1fr max-content/max-content 1fr;
  place-self: center;
  color: #f1f5f9;
  counter-reset: k calc(1 + var(--k)) n var(--n);
  /* transition previous & animated top item indices
   * so they don't change instantly like the current one */
  transition: --p 0s 0.8s, --v 0.8s;
  /* counter & binomial name faded */
  /* this ridiculousness needed for Chrome without flag */
  /* for reference
   * https://css-tricks.com/using-absolute-value-sign-rounding-and-modulo-in-css-today/ */
}
.cardInformations::before {
  color: RGB(from currentColor r g b/0.6);
}
.cardInformations::before { /* counter */
  grid-area: 1/2; /* all grid areas need to be set manually */
  width: 3ch;
  text-align: right;
  content: counter(k) "/" counter(n);
}
@supports not (scale: Abs(-2)) {
  .cardInformations {
    --abs-p: max(var(--k) - var(--p), var(--p) - var(--k));
    --abs-v: max(var(--v) - var(--p), var(--p) - var(--v)) ;
  }
}
@supports not (scale: Sign(-2)) {
  .cardInformations {
    --dir: clamp(-1, (var(--k) - var(--p))*100000, 1) ;
  }
}

article {
  /* absolute value difference between
   * currently top item index and current item index */
  --abs-top: abs(var(--k) - var(--i));
  /* not top item if the absoute value difference ≥ 1
   * top if the difference is 0 */
  --not-top: min(1, var(--abs-top));
  /* top flag is the negation */
  --top: calc(1 - var(--not-top));
  /* difference between moving image index which is
   * previous top item index --p if going backwards,
   * current top item index --k if going forwards
   * and current item index --i */
  --val-mov: ((1 - var(--fwd))*var(--p) + var(--fwd)*var(--k) - var(--i));
  --abs-mov: abs(var(--val-mov));
  /* not moving image if the absoute value difference > 1
   * moving image if the difference is 0 */
  --not-mov: min(1, var(--abs-mov));
  /* moving flag is the negation */
  --mov: calc(1 - var(--not-mov));
  grid-area: 1/1/-1/-1; /* stack to occupy entire parent grid */
  grid-template: subgrid/subgrid; /* and inherit template */
  /* debatable whether z-index is the best way
   * maybe CSS 3D transforms would be a better idea */
  /* depends on number of items, its own index and top item index */
  z-index: mod(calc(var(--n) - 1 + var(--i) - var(--k)), var(--n));
  /* transition z-index */
  transition: z-index 0.8s cubic-bezier(1, -0.9, 0, 1.9);
  /* this ridiculousness needed for Chrome without flag */
}
@supports not (scale: Abs(-2)) {
  article {
    --abs-top: max(var(--k) - var(--i), var(--i) - var(--k));
    --abs-mov: max(var(--val-mov), -1*var(--val-mov));
  }
}

.cardInformations .h2, p {
  /* fade out and slide down when not top item anymore,
   * delayed fade in and slide up when becoming top item */
  translate: 0 calc(var(--not-top) * 1lh);
  opacity: var(--top);
  transition: 0.4s calc(var(--top)*.5*0.8s);
  transition-property: translate, opacity;
}

.cardInformations p {
  color: black;
}

/* need to specify grid-area for all */
.cardInformations .h2 {
  grid-area: 2/2;
}

p {
  grid-area: 3/2;
}

.cardInformations img {
  /* value that grows from 0 to 1, then goes back to 0
   * during the switching top items transition */
  --sin: sin(var(--prg)*.5turn);
  grid-area: 1/1/-1; /* occupy entire first column */
  /* slight glow effect */
  /* whatever, maybe better ways for setting dims */
  object-fit: cover; /* fill with no distortion */
  border-radius: 0.75em;
  /* slide just moving image out & back in */
  translate: calc(-150% * var(--mov) * sqrt(var(--sin)));
  /* random rotation, but not during slide out & back in transition */
  rotate: calc((1 - var(--sin)) * var(--a));
}

.cardInformations div { /* button wrapper */
  display: flex;
  gap: 2em;
  grid-area: 4/2;
  /* prevent button clicks during animation */
  z-index: calc((1 - min(1, var(--abs-p))) * var(--n));
}

.cardInformations .caption {
  display: block;
  text-align: center;
  pointer-events: none;
}

.cardInformations button { /* prettify button */
  --sgn: -1;
  --prc: calc(var(--hov, 0)*100%);
  --c: color-mix(in hsl, #818cf8 var(--prc), #52527a);
  border: none;
  width: 1lh;
  aspect-ratio: 1;
  border-radius: 50%;
  background: RGB(from var(--c) r g b/0.2);
  color: color-mix(in hsl, #818cf8 var(--prc), currentcolor);
  font: 900 2em/1.5 sans-serif;
  transition: 0.3s ease-out;
  transition-property: background-color, color;
}
.cardInformations button::before { /* arrow, SVG likely better, whatever */
  place-self: center;
  border: solid 2px;
  border-width: 2px 2px 0 0;
  width: 35%;
  aspect-ratio: 1;
  translate: calc(var(--sgn) * -15%);
  rotate: 45deg;
  scale: var(--sgn);
  content: "";
}
.cardInformations button[data-inc="1"] {
  --sgn: 1;
}
.cardInformations button:is(:hover, :focus) {
  --hov: 1 ;
}

@media (max-width: 767.98px) {
  .cardInformations {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    padding-bottom: 50px;
    padding-bottom: 0.5rem;
  }
}
@media (max-width: 767.98px) {
  .cardInformations + .navContainer {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    margin-bottom: 0rem;
  }
}
@media (max-width: 767.98px) {
  .cardInformations + .navContainer .navInnerContainer {
    width: fit-content;
  }
}
.cardInformations + .navContainer .navInnerContainer button {
  appearance: none;
  border: none;
  background: transparent;
}
.cardInformations + .navContainer .navInnerContainer button .circle {
  display: block;
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 100%;
  pointer-events: none;
  background: #6FB2D6;
}
.cardInformations + .navContainer .navInnerContainer button .circle svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  pointer-events: none;
}
.cardInformations + .navContainer .navInnerContainer button .circle svg path {
  fill: white;
}
.cardInformations article img {
  position: relative;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 60%;
  height: auto;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.0705882353);
  -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.0705882353);
}
@media (min-width: 1400px) {
  .cardInformations article img {
    top: 0;
    transform: translateX(-50%);
  }
}
@media (max-width: 767.98px) {
  .cardInformations article img {
    width: 100%;
    margin-left: 0;
  }
}
.cardInformations article .caption {
  font-size: 0.9rem;
}
@media (max-width: 767.98px) {
  .cardInformations article .caption {
    margin-top: 3rem !important;
    left: 0;
  }
}
@media (max-width: 575.98px) {
  .cardInformations article .caption {
    margin-top: 2rem !important;
    margin-bottom: 1.5rem !important;
  }
}
.cardInformations article .cardInformationsImage {
  max-width: 450px;
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .nomarginright .cardSwitchWrapper {
    min-height: 200px;
    margin-top: 2rem;
  }
}
@media (max-width: 767.98px) {
  .nomarginright .cardSwitchWrapper {
    right: 0;
  }
}
.nomarginright .cardSwitchWrapper .cardInformations article .cardInformationsImage {
  width: 80% !important;
}
@media (max-width: 991.98px) {
  .nomarginright .cardSwitchWrapper .cardInformations article .cardInformationsImage {
    width: 100% !important;
  }
}
@media (max-width: 767.98px) {
  .nomarginright .cardSwitchWrapper .cardInformations article .cardInformationsImage {
    width: 100% !important;
    transform: translateX(-50%);
    margin-left: 0;
    margin-top: 3rem;
  }
}
.nomarginright .cardSwitchWrapper .navContainer {
  position: relative !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 125px !important;
  margin-top: 2rem !important;
  z-index: 2;
}

.nomarginleft {
  padding-left: 0;
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .nomarginleft .cardSwitchWrapper {
    min-height: 200px;
    margin-top: 2rem;
  }
}
.nomarginleft .cardSwitchWrapper .cardInformations article .cardInformationsImage {
  width: 80% !important;
}
@media (max-width: 991.98px) {
  .nomarginleft .cardSwitchWrapper .cardInformations article .cardInformationsImage {
    width: 100% !important;
  }
}
@media (max-width: 767.98px) {
  .nomarginleft .cardSwitchWrapper .cardInformations article .cardInformationsImage {
    width: 100% !important;
    transform: translateX(-50%);
    margin-left: 0;
    margin-top: 3rem;
  }
}
.nomarginleft .cardSwitchWrapper .navContainer {
  position: relative !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 125px !important;
  margin-top: 2rem !important;
}

.nomarginleft .cardSwitchWrapper .cardInformations + .navContainer,
.nomarginright .cardSwitchWrapper .cardInformations + .navContainer {
  position: absolute !important;
  top: auto !important;
  bottom: -100px;
}
@media (max-width: 767.98px) {
  .nomarginleft .cardSwitchWrapper .cardInformations + .navContainer,
  .nomarginright .cardSwitchWrapper .cardInformations + .navContainer {
    position: relative !important;
    top: inherit !important;
    bottom: 0;
    justify-content: end;
    margin-top: 1rem !important;
    margin-bottom: 0;
  }
}
@media (max-width: 499.98px) {
  .nomarginleft .cardSwitchWrapper .cardInformations + .navContainer .navInnerContainer,
  .nomarginright .cardSwitchWrapper .cardInformations + .navContainer .navInnerContainer {
    top: 0;
  }
}
@media (max-width: 499.98px) {
  .nomarginleft .container-wrapper .layout-0.outer-container,
  .nomarginright .container-wrapper .layout-0.outer-container {
    margin-bottom: 3rem !important;
  }
}

@media (max-width: 499.98px) {
  .container-wrapper .layout-0.outer-container {
    margin-bottom: 0rem !important;
  }
}

@media (max-width: 499.98px) {
  .cardInformations + .navContainer {
    margin-top: 0;
  }
  .cardInformations + .navContainer .navInnerContainer {
    position: relative;
    top: 0rem;
  }
}
@media (max-width: 575.98px) {
  .cardSwitchWrapper .cardInformations .caption {
    margin-bottom: 0 !important;
    padding-top: 1rem;
  }
}

/*# sourceMappingURL=cardSwitch.css.map */
