:root {
  --texte: #111;
  --fond: #fff;
  --gris: #777;
  --lien: #00e;
  --trait: #ccc;
}

@media (prefers-color-scheme: dark) {
  :root {
    --texte: #eee;
    --fond: #111;
    --gris: #999;
    --lien: #8af;
    --trait: #444;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  padding: 1rem 16px 4rem;
  max-width: 72rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.45;
  color: var(--texte);
  background: var(--fond);
}

a {
  color: var(--lien);
}

header {
  margin-bottom: 2rem;
}

.site {
  margin: 0 0 .5rem;
  font-weight: bold;
}

.site a {
  color: inherit;
  text-decoration: none;

}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  /* gap: .25rem 1.25rem; */
  /* border-bottom: 1px solid var(--texte); */
  /* padding-bottom: .5rem; */
}

nav a{
  display: block;
  border: 1px solid currentColor;
    text-decoration: none;
    padding: 0.25rem 0.5ch;
  text-align: center;
      color: var(--texte);
}

/* copie invisible du texte en gras : réserve sa largeur pour éviter le saut */
nav a::after {
  content: attr(data-texte);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: bold;
}

nav a[aria-current] {
  color: var(--texte);
  text-decoration: none;
  font-weight: bold;
  /* 2e pixel de bordure sans changer la taille de la boîte */
  box-shadow: inset 0 0 0 1px currentColor;
}


.intro {
  color: var(--gris);
  margin-bottom: 1.5rem;
}

.intro p {
  margin: 0;
}

.liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem 1.5rem;
}

.carte a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.carte .image {
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--trait);
  overflow: hidden;
}

.carte .image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carte .sans-photo {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--gris);
}

.carte .legende {
  display: block;
  margin-top: .5rem;
}

.carte .id {
  font-family: ui-monospace, Menlo, monospace;
  font-size: .85em;
  margin-right: .35em;
}

.carte .id::after{
  content: ' /'
}

.carte .titre {
  color: var(--lien);
  text-decoration: underline;
}

.carte .type {
  display: block;
  color: var(--gris);
}

.carte a:hover .titre {
  text-decoration-thickness: 2px;
}

.carte.parti .image {
  opacity: .4;
}

.carte.parti .titre {
  text-decoration: line-through;
  color: var(--gris);
}

@media (min-width: 600px) {
  .liste {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .liste {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* fiche */
.fiche {
  max-width: 48rem;
}

.ref {
  font-family: ui-monospace, Menlo, monospace;
  margin: 0;
  display: flex;
  justify-content: space-between;
}

.ref button {
  font: inherit;
  font-size: .8em;
  margin-left: .5rem;
  padding: 0 .4em;
  color: var(--texte);
  background: none;
  border: 1px solid var(--texte);
  border-radius: 0;
  cursor: pointer;
}

.ref button:active {
  background: var(--texte);
  color: var(--fond);
}

h1 {
  font-size: 2rem;
  font-weight: normal;
  margin: .25rem 0;
  line-height: 1.15;
  margin-top: 2rem;
}

.fiche.parti h1 {
  text-decoration: line-through;
}

.fiche>.type {
  margin-top: 0;
  color: var(--gris);
}

.photos {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.photos img {
  display: block;
  width: 100%;
  height: auto;
}

.parcours {
  display: flex;
  flex-wrap: wrap;
  max-width: 48rem;
  gap: .5rem;
  margin-bottom: 2rem;
}

.bouton {
  display: block;
  border: 1px solid currentColor;
  padding: 0.25rem 1ch;
  color: var(--texte);
  text-decoration: none;
}

.bouton:hover {
  box-shadow: inset 0 0 0 1px currentColor;
}

.fleches {
  display: flex;
  gap: .5rem;
  margin-left: auto;
}

.fleches[hidden] {
  display: none;
}

.fleches .bouton {
  min-width: 2.5em;
  text-align: center;
}

.fleches .vide {
  color: var(--trait);
}

.fleches .vide:hover {
  box-shadow: none;
}

/* page des objets cachés */
.titre-liste {
  margin: 0 0 1.5rem;
}

/* nom de la personne, uniquement sur /reserve */
.carte .reserve-par {
  display: block;
}
