:root {
  /* variables */
  /* https://radicalweb.design/ressources/css/plus/variables/ */
  --maxwidth: 60rem;
  /* variables pour fontes variables */
  /* https://radicalweb.design/ressources/typo/variables/ */
  --font-wght: 350;
  --font-wdth: 100;
  --textcolor: rgb(44, 63, 41);
  --backgroundcolor: rgb(148, 179, 159);
}





/* ------------------------------------------------------------ thème clair & sombre */
/* Thème clair */
:root,
:root[data-force-color-mode="light"] {
  color-scheme: light dark;
  --textcolor: rgb(44, 63, 41);
  --bordercolor: rgb(99, 99, 99);
  --accentcolor: #1da840;
  --backgroundcolor: rgb(148, 179, 159);
}


/* Thème sombre : obligation de dupliquer dans @media les règles ci-dessus */
@media (prefers-color-scheme: dark) {
  :root {
    --textcolor: rgb(148, 179, 159);
    --bordercolor: rgb(99, 99, 99);
    --accentcolor: #1da840;
    --backgroundcolor: rgb(44, 63, 41);
    --font-wght: 280;
  }
}

/* Thème sombre */
:root[data-force-color-mode="dark"] {
  --textcolor: rgb(148, 179, 159);
  --bordercolor: rgb(43, 68, 39);
  --accentcolor: #1da840;
  --backgroundcolor: rgb(44, 63, 41);
  --font-wght: 280;
}

/* ------------------------------------------------------------ body & reset */

body { 
  background: var(--backgroundcolor);
  color: var(--textcolor);
  font-family: "Degheest", monospace;
  line-height: 1.6;
  margin: 0;
}


*, *::before, *::after {
  /* dans le cas d’une fonte variable, on établit des variables (ici, graisse et chasse) pour tous les éléments: */
  font-variation-settings: "wght" var(--font-wght, 400), "wdth" var(--font-wdth, 112.5);
}



/* ------------------------------------------------------------ liens */
a {
  color: #148d32;
  transition: color 500ms linear 0ms;
}

a:hover {
  color: rgb(92, 122, 87);
}

/* ------------------------------------------------------------ typographie */


h1 {
  font-family: 'Grandola';
  font-size: 2.5rem;
  --font-wght: 400;
  --font-wdth: 90;
  line-height: 1.2;
  text-wrap: balance;
}

.subtitle {
    font-family: 'Grandola';
    color: var(--backgroundcolor);
  --font-wght: 400;
  --font-wdth: 90;
  line-height: 1.2;
  text-wrap: balance;
}

h2, h3 {
  font-family: 'Grandola';
  font-size: 1.75rem;
  --font-wght: 400;
  line-height: 1.3;
  text-wrap: balance;
}
p {
  margin-bottom: 1.6em;
}
ul {
  padding: 1rem;
  list-style-type: circle;
}
ul li {
  padding: 0.4rem;
}


blockquote {
  text-indent: -1em;
  text-align: left;
  padding: 1rem;
    scroll-snap-type: y mandatory;
  overflow-y: scroll;
   scroll-snap-align: start;
    height: 100vh;
  width: calc(100% - var(--navwidth));

}

.quote {
    border-bottom: 1px solid var(--bordercolor);
  padding: 4rem 3rem 2rem;
  height :100vh;
  font-size: 2rem;
  font-family: "FT-88";

}

footer {
  font-style: italic;
}
/* ------------------------------------------------------------ navigation */
.top-nav { 
  border-bottom: 1px solid var(--bordercolor);
  padding: 1em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  background: var(--backgroundcolor);
  
}
.top-nav a {
  text-decoration: none;
  letter-spacing: .05em;
  display: inline-block;
  font-size: 18px;
  position: absolute;
  top: 10vh;
  right: 5vh;
  transform-origin: center;
  writing-mode:vertical-rl;
  font-size: 1.5vh;
}

/* ------------------------------------------------------------ main */
main { 

}
main > * {
  padding: 1rem;
}

/* ------------------------------------------------------------ header */
header { 
  border-bottom: 1px solid var(--bordercolor);
  padding: 4rem 3rem 2rem;
  height : 87vh;
  background-color: var(--textcolor);
  color: var(--backgroundcolor);
}
header h1 { 
  font-size: 5rem;

  strong {
  color: #3bc15c;
  font-size: 1.5em;
      background-image: -webkit-gradient(linear, left top, right top, from(#fffb00), to(#8400ff));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; 
}

}
header h1 strong { 
  display: block;
  font-weight: inherit;
}

.authors { 
  text-transform: uppercase;
  letter-spacing: .02em
}

 

.keywords { }
.keywords a { }

/* ------------------------------------------------------------ texte */
.epigraphe { }

.text { 
  text-indent: -1em;
  text-align: left;
  color: var(--textcolor);
  display: flex;
  flex-direction: column;
  gap: 1.6em;
  padding: 1.6em 1em;
}
.text p { 
  margin: 0;
}
.epigraphe,
.text .quote { 
  /* color: var(--accentcolor); */
  --font-wght: 900;
  max-width: max(75%, 23em);
  align-self: flex-end;
}

/* > * sélectionne tous les enfants directs des éléments */
.text,
.readmore > *,
.biography > *,
.footnotes > * {
  /* `margin-inline` cible les marges droite et gauche, en système d’écriture horizontal */
  margin-inline: auto;
  max-width: var(--maxwidth);
  
}
/* ------------------------------------------------------------ tableau ! (pages/03-mal-developpement.html) */
table {
  border-collapse: collapse;
}
th { --font-wght: 600}
td, th {
  padding-block: .5em;
  vertical-align: top;  
  text-align: left;
  border-bottom: 1px solid var(--bordercolor);
}
td:not(:first-child),
th:not(:first-child) { padding-left: .5em; border-left: 1px solid var(--bordercolor);}
td:not(:last-child),
th:not(:last-child) { padding-right: .5em; border-right: 1px solid var(--bordercolor);}
tbody tr:last-child td, tbody tr:last-child th {
  border-bottom: none;
}
/* ------------------------------------------------------------ texte + */
.readmore {
  border-top: 2px solid var(--bordercolor);
}
.readmore,
.footnotes { 
  border-bottom: 1px solid var(--bordercolor);
     display: grid; 
    gap:.5em;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    padding: 2rem
    
}

.footnotes ol { 
  padding: 0;
  list-style-position: inside;
}

.footnotes li {
  text-indent: -2em;
  padding-left: 2em;
}

/* ------------------------------------------------------------ footer */
#footer {
  display: flex;
  flex-direction: column;
}
#footer > * {
  padding: 1.6em 1em;
}

.articles-prev-next {
  display: flex;
  gap: 1em;
  justify-content: space-between;
  border-bottom: 1px solid var(--bordercolor);
}

.menu {
  display: none;
  position: fixed;
  background: var(--backgroundcolor);
  padding: 20px;
  border-right: 3px solid var(--accentcolor);
  border-bottom: 3px solid var(--accentcolor);
  -webkit-overflow-scrolling: touch;
  overflow-y: auto; 
  z-index: 9999;


}


.menu.open {
  display: block;
  overflow-y: auto; 
      min-height: 100vh;
  max-width: 50vh;
    scroll-snap-type: y mandatory;
  overflow-y: scroll;
  
}


#togglemenu {
  width: 30px;
  height: 22px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
}

#togglemenu:hover {
  display: inline-block;
  transition: transform 0.3s ease;
  transform: rotate(90deg);
  
}

#togglemenu::before,
#togglemenu::after,
#togglemenu span {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background: var(--textcolor);  left: 0;
   transform: rotate(0deg);         
  transition: transform 0.35s ease, top 0.35s ease, left 0.35s ease;
}

#togglemenu::before {
  top: 3px;
}

#togglemenu span {
  top: 10px;
  
}

#togglemenu::after {
  top: 17px;
}

/* Placement normal */
#togglemenu.active::before {
  left: 0;
  top: 4px;
  transform:  rotate(45deg);
  margin-left: 0;
  margin-top: 2vh;
  
}

#togglemenu.active span {
  left: 9.5px;
  top: -2px;
  transform: rotate(90deg);
  margin-left: 0;
  margin-top:2vh;
}

#togglemenu.active::after {
  left: 19px;
  top: 4px;
  transform: rotate(-45deg);
    margin-left: 0;
  margin-top: 2vh;
}





@media (max-width: 640px) {

  header { 
  border-bottom: 1px solid var(--bordercolor);
  padding: 4rem 3rem 2rem;
  height : 80vh;
  box-sizing: border-box;
}
header h1 { 
  font-size: 1.5rem;
}

.authors {
  padding-top: 3rem;

}

.subtitle {
  font-size: 1.5rem;

}

p {
  padding-left: 1rem;
}



}