* {
  box-sizing: border-box;
}
::-moz-selection {
  background: #7a2bbf;
}
::selection {
  background: #7a2bbf;
}
html {
  font-size: 12px;
}
html,
body {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* AJOUT IMPORTANT : disposition en trois colonnes */
main {
  display: flex;
  height: 100%;
}

#content {
  overflow: scroll;
  padding: 6rem 0;
}

#posts {
  width: 14%;
  padding-right: 20px;
  border-right: 1px solid rgb(109, 103, 225);
}

#viewer {
  flex: 1 1 auto;
  padding: 6rem 2rem;
  overflow: scroll;
  background: white;
  border-left: 0px solid rgb(109, 103, 225);

  position: relative;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: white;
  transform: translateX(100%); /* complètement à droite hors écran */
  transition: transform 0.5s ease;
}

#viewer.open {
  transform: translateX(0); /* la div glisse à l’écran */
}

/* Apparence des liens cliquables */

a.topic-link,
a.log-link {
  cursor: pointer;
  color: #7a2bbf;
  text-decoration: underline;
}
a.topic-link:hover,
a.log-link:hover {
  color: #0000ee;
}

main > div {
  flex: var(--open-space-width) 0 0;
}

pre {
  font-family: "Times New Roman", Times, serif;
  width: 100%;
  overflow: auto;
  font-size: 2rem;
}

button {
  all: unset;
  cursor: pointer;
}

button.notSelected {
  opacity: 0.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: normal;
  padding: 0;
  margin: 0;
}

h1 {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  color: var(--color-1);
  line-height: var(--lh-big);
  font-size: var(--fs-big);
  padding: 1rem 1rem 0 1rem;
  display: block;
  position: fixed;
  z-index: 100000;
}
h1 a {
  color: var(--color-1);
  background: white;
  line-height: 0.6em;
  display: inline-block;
}

h2.category {
  font-size: 2rem;
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  line-height: 2rem;
  margin-top: 1rem;
  color: black;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

a:link {
  color: #7a2bbf; /* lien normal */
}

a:visited {
  color: #000000; /* lien déjà cliqué */
}

a:hover {
  color: #0000ee; /* au survol */
}

a:active {
  color: #7a2bbf; /* au clic */
}

main {
  display: flex;
  height: 100%;
  transition: transform 500ms linear;
}

body.post main {
  transform: translateX(var(--open-space-translate));
  color: black;
}

main > div {
  flex: var(--open-space-width) 0 0;
}

body.post #content {
  color: var(--color-1);
  cursor: pointer;
}

#content {
  transition: color 500ms linear;
  font-family: redaction;
  line-height: var(--lh-big);
  font-size: var(--fs-big);
  overflow: scroll;
  padding: 6rem 0;
}

p {
  padding: 1px 20px;
}
#content > header {
  position: sticky;

  top: 1rem;
  padding: 0 5rem 18rem 5rem;
}

header p {
  margin: 0;
  padding: 0;
}
#content > header p + p {
  text-indent: 5rem;
}

#pratiques {
  padding: 0 2rem;
  background: white;
  color: rgb(0, 0, 0);
  /* position: relative; */
  /* font-style: italic; */
  border-top: 1px solid rgb(109, 103, 225);
  z-index: 10000;
}

#pratiques ul,
#pratiques li {
  list-style: none;
  margin: 0;
  padding: 0;
}

#pratiques li {
  scroll-margin-top: 6rem;
  scroll-margin-left: 5rem;
  padding: 0 0 4rem 0;
  transition: all 200ms;
  background-color: white;
  color: var(--color-1);
}

.pratique__button {
  font-family: redaction;
  font-style: normal;
}

.pratique__button p {
  margin: 0;
}

#posts {
  border-left: 1px solid rgb(109, 103, 225);
  line-height: var(--lh-medium);
  font-size: var(--fs-medium);
  overflow: scroll;
  padding: 3rem 5rem 3rem 3rem;
  position: relative;
  background: white;
  z-index: 10000;
  padding: 6rem 1rem;
}

#posts article h2 {
  font-weight: bold;
  text-transform: lowercase;
  line-height: var(--lh-medium);
  font-size: var(--fs-medium);
  font-family: redaction;
}

.detail.hidden {
  display: none;
}

.detail {
  /*border-bottom:1px solid var(--color-1-light);*/
  margin: 1rem 0 3rem 0;
  scroll-margin-top: 3rem;
  position: relative;
  transition: opacity 200ms, max-height 1s;
  display: flex;
  align-items: flex-start;
}

.detail.opened,
.pratique.opened {
  min-height: 100dvh;
}

.detail:not(.detail.opened) .gallery,
.detail:not(.detail.opened) .detail__content {
  display: none;
}

#posts .detail header {
  font-weight: bold;
  padding: 0 3rem 0 0;

  position: sticky;
  top: 0;
  flex: 0 0 calc(20dvw - 3rem);
}
#posts .detail header a {
  color: blue;
  text-decoration: none;
}
#posts .detail.opened header a {
  color: black;
}
.detail__abstract {
  line-height: var(--lh-small);
  font-size: var(--fs-small);
  margin-top: 1rem;
}
.date {
  font-family: "Times New Roman", Times, serif;
}

.detail__content p,
.detail__content li {
  margin: var(--lh-medium) 0;
}

.detail__content {
  font-family: "Times New Roman", Times, serif;

  min-width: 0;
}

.detail__footer {
  border-top: 1px solid rgb(109, 103, 225);
  font-family: "Times New Roman", Times, serif;
  font-weight: bold;
  line-height: var(--lh-small);
  font-size: var(--fs-small);
}

.detail__content ul {
  list-style-type: "— ";
}

.detail__content__about {
  padding-top: 3rem;
  display: grid;
  column-gap: 2rem;
  grid-template-columns: 1fr 1fr 1fr;
  font-family: "Times New Roman", Times, serif;
  font-weight: bold;
}

.detail__content__pratiques {
  font-family: "Times New Roman", Times, serif;
  font-weight: bold;
}

.detail__text {
  position: relative;
}

.gallery {
  display: flex;
  overflow: scroll;
  scrollbar-color: blue transparent;
  scrollbar-width: thin;
  column-gap: 3rem;
  margin: var(--lh-medium) 0;
}
.gallery__item {
  position: relative;
  margin: 0;
  margin-left: 2rem;
  padding: 0;
}

.pratique {
  font-family: instrument;
  font-style: italic;
  font-weight: normal;
}
.pratique__content {
  color: black;
  font-family: Redaction;
  font-style: normal;
}
.pratique:not(.opened) .pratique__content {
  display: none;
}
.pratique header a {
  color: blue;
}
.pratique.opened header a {
  color: black;
}

.pratique header p span.tool:first-child:after {
  content: " —";
}

.pratique__content__info {
  line-height: var(--lh-small);
  font-size: var(--fs-small);
  font-family: meta-old-french;
  font-weight: bold;
  font-style: normal;
  margin: 0;
  margin-top: var(--lh-big);
  color: black;
}
.pratique__content__info p {
  margin: 0;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white; /* fond blanc */
  color: black; /* texte noir */
  padding: 15px 20px; /* marge interne */
  text-align: left; /* texte aligné à gauche */
  border-top: 1px solid rgb(109, 103, 225); /* petite bordure optionnelle */
  z-index: 100;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: white;
  color: black;
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid rgb(109, 103, 225); /* pour le header */
  z-index: 100;
}
