* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #faf9f6;
  color: #222;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}

header {
  background: #222;
  color: #fff;
}

.entete,
nav ul,
main {
  width: min(100% - 2rem, 56rem);
  margin-inline: auto;
}

.entete {
  padding-block: 1.5rem 1rem;
}

.entete p {
  margin: 0;
}

.titre {
  font-size: 1.75rem;
  font-weight: bold;
}

nav ul,
.sommaire {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-block: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: block;
  padding-block: 0.5rem;
  border-bottom: 3px solid transparent;
  color: inherit;
}

nav a[aria-current="page"] {
  border-color: #fff;
  text-decoration: none;
}

main {
  padding-block: 2rem 3rem;
}

h1,
h2 {
  line-height: 1.2;
}

h1,
h2,
section p {
  margin: 0;
}

section {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid #cdc9bf;
  background: #fff;
}

section h2 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.presentation p + p {
  margin-top: 0.75rem;
}

.sommaire {
  margin-top: 1rem;
}

.sommaire a {
  color: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow-wrap: anywhere;
  text-align: left;
}

th,
td {
  border: 1px solid #cdc9bf;
  padding: 0.5rem;
}

th {
  background: #efede7;
}

@media (max-width: 36rem) {
  th,
  td {
    padding: 0.25rem;
  }
}

.tableau-palmares {
  overflow-x: auto;
}

#palmares .tableau-palmares {
  margin-top: 1rem;
}

.tableau-palmares table {
  min-width: 30rem;
}

.tableau-palmares th[scope="row"] {
  background: #fff;
}

.portrait {
  display: block;
  object-fit: cover;
  object-position: center 25%;
}

.legendes article {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-block: 0.75rem;
  border-top: 1px solid #cdc9bf;
}

.legendes .portrait {
  flex-shrink: 0;
}

.legendes h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.credits-photos {
  margin-top: 1.5rem;
}

.regle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 15rem);
  align-items: center;
  gap: 1.5rem;
}

.regle:nth-of-type(even) {
  grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr);
}

.regle:nth-of-type(even) .schema-regle {
  grid-column: 1;
  grid-row: 1;
}

.regle ul {
  padding-inline-start: 1.25rem;
  margin-bottom: 0;
}

.schema-regle {
  width: min(100%, 15rem);
  margin: 0;
  justify-self: center;
  text-align: center;
}

.echiquier {
  display: grid;
  grid-template: repeat(8, minmax(0, 1fr)) / repeat(8, minmax(0, 1fr));
  aspect-ratio: 1;
  container-type: inline-size;
  border: 1px solid #493a30;
  background: conic-gradient(#92745c 25%, #eee2ce 0 50%, #92745c 0 75%, #eee2ce 0) 0 0 / 25% 25%;
}

.echiquier span {
  place-self: center;
  font-family: "DejaVu Sans", "Apple Symbols", "Segoe UI Symbol", sans-serif;
  font-size: 10cqi;
  line-height: 1;
}

.piece-blanche {
  color: #fff;
  text-shadow: 0 1px 2px #111, 1px 0 #111, -1px 0 #111, 0 -1px #111;
}

.piece-noire {
  color: #16110e;
}

.echiquier .case-marquee {
  color: #252015;
  font-size: 8cqi;
}

.schema-regle figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

@media (max-width: 42rem) {
  .regle,
  .regle:nth-of-type(even) {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .regle:nth-of-type(even) .schema-regle {
    grid-column: auto;
    grid-row: auto;
  }
}
