/* base.css */
*,
*::before,
*::after {
  box-sizing: border-box;
}

@supports (--blue: blue) {
  blockquote,
  body,
  dl, dd,
  figure,
  h1, h2, h3, h4, h5, h6,
  p,
  ul, ol {
    margin: 0;
  }
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg, whitesmoke);
  color: var(--fg, midnightblue);
  font: var(--sz-0, 100%)/var(--lh, 1.5) var(--ff-sans-serif, sans-serif);
  letter-spacing: 0.015em;
  margin: 0;
  padding: 0;
  text-rendering: optimizeSpeed;
}

body > * {
  box-sizing: content-box;
  margin-inline: auto;
  margin-top: var(--space-y-xl, 4.5em);
  max-width: var(--mx-wd, 48rem);
  padding-inline: 1.25rem;
}

body > :is(header,main,footer) > * + *,
section > * + *,
article > * + * {
  margin-top: var(--space-y, 2em);
}

h1, h2, h3, h4, h5, h6 {
  line-height: var(--lh-sm, 1.15);
}

h1, h2, h3 {
  font-family: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

[role="button"],
button,
input[type="button"],
input[type="submit"],
summary {
  cursor: pointer;
}

aside,
article,
details,
footer,
header,
hr,
main,
nav,
section {
  display: block
}

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

hr {
  border: solid;
  border-width: 1px 0 0;
  margin-inline: auto;
  max-width: 100%;
}

img,
picture {
  display: block;
  height: auto;
  max-width: 100%;
}

/* This way figcaption will always have the same width as figure */
figure {
  display: table;
  margin-inline: 0;
}

figure.table-overflow {
  display: block;
  overflow-x: auto;
}

figcaption {
  caption-side: bottom;
  display: table-caption;
  font-size: smaller;
}

/* Don't use !important, double the selector */
[hidden][hidden] {
  display: none;
}

abbr {
  font-style: normal;
  font-variant-caps: all-small-caps;
  font-variant-numeric: oldstyle-nums;
  letter-spacing: 0.1em;
}

abbr[title] {
  cursor: help;
}

:focus {
  outline: 0.1em solid var(--seagreen, seagreen);
  outline-offset: 2px;
  text-decoration: none;
}

a {
  color: var(--ln, brown);
}

a:hover {
  text-decoration: none;
}

a:focus:active {
  outline: none;
}

a:active {
  text-decoration: underline;
}

[href^="mailto:"] {
  overflow-wrap: anywhere;
}

select,
textarea,
[type="date"],
[type="datetime"],
[type="datetime-local"],
[type="email"],
[type="month"],
[type="number"],
[type="password"],
[type="search"],
[type="tel"],
[type="text"],
[type="time"],
[type="url"],
[type="week"] {
  padding: var(--space-xxs, 0.25rem);
}

label + input,
label + select,
label + textarea {
  display: list-item;
}

textarea:not(:placeholder-shown):invalid,
input:not(:placeholder-shown):invalid {
  border-color: var(--bad, red);
}

input:valid:not(:optional),
select:valid:not(:optional),
textarea:valid:not(:optional) {
  border-color: var(--good);
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

textarea {
  resize: vertical;
  /* max-width: 74ch; */
}

pre {
  overflow-x: auto;
}

code {
  font-weight: normal;
}

ol {
  padding-left: var(--space, 2rem);
}

ul {
  padding-left: var(--space-sm, 1rem);
}

[role="list"] {
  list-style: none;
  padding-left: 0;
}

dd + dd,
dt + dd,
li + li,
li > ol,
li > ul {
  margin-top: var(--space-y-xs, 0.5em);
}

dd {
  margin-left: var(--space-y-sm, 1em);
}

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

table {
  border-collapse: collapse;
  font-size: var(--sz-sm, smaller);
  overflow: auto;
}

table caption {
  font-style: italic;
}

td,
th {
  border: solid var(--fg);
  border-width: 0 0 1px;
  padding: var(--space-sm, 1rem);
  text-align: left;
}

th {
  font-weight: 700;
}

tr :first-child {
  text-align: left;
}

fieldset > * + *,
form > * + * {
  margin-top: var(--space-y-sm);
}

label,
legend {
  align-items: center;
  display: inline-flex;
  font-size: var(--sz-sm);
  font-weight: 700;
  justify-content: space-between;
  padding-left: var(--space-xs, 0.5rem);
}

label > small,
legend > small {
  font-weight: 400;
  margin-left: var(--space-xs, 0.5rem);
}

details > * + * {
  margin-top: var(--space-y-sm, 1em);
}

details > summary::after {
  content: "\0020[ouvrir]";
}

details[open] > summary::after {
  content: "\0020[fermer]";
}

blockquote {
	border-left: var(--sz--xs, 0.25rem) solid var(--ln);
  font-family: var(--ff-sans-serif);
  font-size: var(--sz-1, 1.25rem);
	padding-left: var(--space);
  text-indent: -0.75em;
}

@supports (hanging-punctuation: first) {
  blockquote {
    text-indent: 0;
    hanging-punctuation: first;
  }
}

blockquote::before {
  content: open-quote;
  font-weight: 700;
}

blockquote::after {
  content: close-quote;
  font-weight: 700;
}

blockquote {
  quotes: "«" "»" "‹" "›";
}

blockquote + figcaption {
  margin-top: var(--space-y-sm);
  padding-left: var(--space);
}
