/* BASE */
::placeholder {
  color: var(--color-dark);
  opacity: 0.8;
}
::selection,
::target-text {
  color: var(--color-light-blue);
  background-color: var(--color-dark-blue);
}
::target-text {
  color: var(--color-soft-blue);
  background-color: var(--color-blue);
}
::marker {
  color: var(--color-brique);
}

body {
  font-size: var(--size-0);
  line-height: 1.5;
  color: var(--color-dark);
  background-color: var(--color-light-white);
  accent-color: var(--color-brique);
  text-wrap: pretty;
}

:is(h1, h2, h3, h4, .h2, .h3, .h4) {
  font-weight: bold;
  text-wrap: balance;
}
:is(h1, h2, h3, h4, .h2, .h3, .h4) + * {
  margin-block-start: var(--space-xs);
}
:is(h1) {
  max-inline-size: 20ch;
  font-size: var(--size-5);
  color: var(--color-dark-blue);
}

h2,
.h2 {
  font-size: var(--size-3);
  color: var(--color-dark-blue);
}

h3,
.h3 {
  max-inline-size: initial;
  font-size: var(--size-2);
  letter-spacing: 0.05rem;
}

h4,
.h4 {
  font-size: var(--size-2);
  color: var(--color-dark);
}

h5,
.h5 {
  font-size: var(--size-1);
  color: var(--color-darkBlue);
}

a {
  font-weight: 500;
  color: var(--color-blue);
  text-decoration: underline;
}
/* a:visited {
	color: currentColor;
} */
a:hover,
a:focus {
  text-decoration: none;
}

hr {
  margin-block: var(--space-m-l);
  block-size: 4px;
  background-color: var(--color-dark);
}
hr.small {
  margin-block: var(--space-xs);
  block-size: 2px;
}

ul,
ol {
  padding-inline-start: 1em;
  margin-block: var(--space-xs);
  list-style-type: disc;
}

ul > li + li,
ol > li + li {
  margin-block-start: var(--space-xs);
}

ul ul {
  list-style-type: circle;
}
ul ul,
ul ol,
ol ul,
ol ol {
  margin-block-start: var(--space-2xs);
}
.visually-hidden {
  position: absolute;
  overflow: hidden;
  block-size: 1px;
  inline-size: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(100%);
  white-space: nowrap;
}

.clean-button {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  border: none;
  background: none;
}
.btn {
  padding: var(--space-2xs) var(--space-xs);
  margin-block: var(--space-s);
  display: inline-block;
  font-size: var(--size-0);
  font-weight: bold;
  text-decoration: none;
  border: 2px solid var(--color-blue);
  border-radius: var(--radius-small);
  color: var(--color-white);
  background-color: var(--color-blue);
  transition-property: color, background-color;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}
.btn:hover,
.btn:focus {
  color: var(--color-blue);
  background-color: var(--color-white);
}

button[disabled] {
  cursor: not-allowed;
  color: var(--color-grey-dark);
  border-color: var(--color-grey);
  background-color: var(--color-white);
}

.highlight {
  color: var(--color-blue);
}

/* clean style link */
.clean-link {
  text-decoration: none;
  font-weight: inherit;
  color: currentColor;
}
.clean-link:hover {
  text-decoration: none;
}

/* nice hover link */
.nice-link {
  position: relative;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}
.nice-link:hover {
  text-decoration: none;
}
.nice-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  inline-size: 100%;
  block-size: 2px;
  text-decoration: none;
  transform: scaleX(0);
  opacity: 1;
  transform-origin: 100% 50%;
  background-color: var(--color-brique);
}
.nice-link:hover::after {
  transform: scaleX(1);
  transform-origin: 0% 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .nice-link::after {
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  }
}

/* blockquote */
blockquote {
  margin: var(--space-s) 0;
  padding: var(--space-s);
  font-weight: normal;
  line-height: 1.4;
  border-left: 3px solid var(--color-blue);
  border-radius: 3px;
  background-color: var(--color-soft-blue);
}
blockquote cite {
  font-weight: normal;
  font-style: normal;
  font-size: var(--size-0);
  line-height: 1.2;
}

figure > * + * {
  margin-block-start: var(--space-xs);
}

/* GRID WRAPPER */
.wrapper {
  display: grid;
  grid-template-columns: var(--grid-wrapper);
  --_content-padding: var(--content-padding, var(--space-s));
  column-gap: var(--_content-padding);
}
/* set content inside wrapper column */
:is(.wrapper, .slidev-layout) > * {
  grid-column: wrapper;
}

/* set full width content to full grid */
:is(.wrapper, .slidev-layout) > .full-width {
  /* calculate inline padding based on available space minus content space to align full-width content with wrapper content */
  padding-inline: max(
    calc((100vw - var(--content-width)) / 2),
    var(--_content-padding)
  );
  grid-column: full;
}

:where(.slidev-layout > * + *) {
  margin-block-start: var(--space-xs);
}
.slidev-layout.place-content-center {
  block-size: 100%;
}
