/* =========================
   RESET / GLOBAL
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body,
html {
  margin: 0;
  padding: 0;
  font-family: "Mattone", sans-serif;
}

a {
  color: currentColor;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  opacity: 0.9;
}

/* =========================
   ROOT VARIABLES
========================= */
:root {
  --maxwidth: 60rem;
  --font-wght: 350;
  --font-wdth: 100;
}

:root[data-force-color-mode="dark"] {
  --textcolor: #bc2f57;
  --bordercolor: lemonchiffon;
  --backgroundcolor: lemonchiffon;
}

/* =========================
   BODY / BACKGROUND
========================= */
body::before,
body::after {
  content: "⟡";          
  position: fixed;
  top: 10px;             
  font-size: 2rem;      
  color: lemonchiffon;          
  z-index: 1000;        
  pointer-events: none; 
}

body::before { left: 10px; }
body::after  { right: 10px; }

body.home {
  background-color: lemonchiffon;
  color: #621b56;
}

body.home p.visible a {
  color: #621b56;
  text-decoration: none;
}

body.index,
body.tags {
  font-family: "Mattone";
  background: linear-gradient(180deg, #621b56, #9683ec);
  color: lemonchiffon;
  line-height: 1.8;
  padding: 1em 1em 1.5em;
  margin: 1.5em;
}

/* =========================
   TYPOGRAPHY
========================= */
h1, h2, h3 {
  font-family: 'Crake Test';
  color: lemonchiffon;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.4;
}

h1 {
  font-size: 1.7em;
  transform: rotate(5deg);
  margin-top: 1em;
  margin-bottom: 2em;
}

h1::after {
  content: "°";
  position: absolute;
  bottom: -2em;
  left: 50%;
  transform: translateX(-50%);
}

h2 {
  font-size: 1.5em;
  margin-top: 1em;
  margin-bottom: 2em;
}

h2::before {
  content: "";
  display: block;
  height: 1px;
  background: lemonchiffon;
  margin-top: 2em;
  margin-bottom: 1.5em;
}

h3 {
  font-size: 1.5em;
  margin-top: 1em;
  margin-bottom: 2em;
}

p.visible {
  font-family: 'Crake Test';
  text-align: center;
  font-size: 20em;
  color: currentColor;
}

/* =========================
   NAVIGATION / LAYOUT
========================= */
.top-nav { 
  text-transform: uppercase;
  font-family: 'Crake Test';
  color: lemonchiffon;
  text-align: left;
  top: 0;
  padding: 1em;
  background: var(lemonchiffon);
}

.top-nav a {
  text-decoration: none;
  letter-spacing: 0.05em;
}

.article {
  font-family: "Mattone";
  background: linear-gradient(180deg, #621b56, #9683ec);
  margin-top: 5em;
  margin-left: 20ch;
  margin-right: 20ch;
}

main h2,
main h3,
.intro,
.content,
.outro,
.tags-link {
  margin-left: 0;
  padding-left: 0;
}

main ul,
ul.intro,
ul.outro {
  margin-left: 0;
  padding-left: 1.2rem;
}

main li,
ul li {
  margin-left: 0;
  padding-left: 0;
}

/* =========================
   LISTS / ARTICLES
========================= */
ul li::before {
  content: "— ";
}

ul.intro li::before,
ul li.hidden::before {
  content: none;
}

ul {
  list-style-type: disc;
  line-height: 1.8;
  color: lemonchiffon;
  font-size: 1.1em;
  max-width: 40em;
  margin-left: 1em;
  margin-right: 1em;
}

ul li.hidden a {
  text-decoration: none;
}

/* Pour différencier les liens sous Post-scriptum */
ul.outro li {
  margin-top: 0.5em;
}

/* =========================
   TEXT / CONTENT
========================= */
.text {
  font-size: 1.15em; 
  line-height: 1.6;
  max-width: 40em;
  color: lemonchiffon;
  margin-left: 0.2em;
  margin-right: 0.2em;
}

.text p {
  margin-top: 3em;
  margin-bottom: 3em;
  line-height: 1.9;
  background: currentColor;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: lemonchiffon;
  transform: skewX(3deg);
}

.text p:nth-of-type(2n) {
  transform: skewX(-3deg);
}

.text p + p {
  margin-top: 2.5em;
}

.text em {
  font-style: italic;
  opacity: 0.95;
}

/* =========================
   AUTEURS / META
========================= */
.authors {
  font-family: "Mattone";
  font-size: 1.1em;
  color: lemonchiffon;
  margin-left: 2em;
  margin-right: 2em;
  text-align: right;
  margin-top: 5em;
}

.keywords {
  color: lemonchiffon;
  text-align: center;
  font-size: 0.8em;
  opacity: 0.4;
  font-style: italic;
  margin-left: 0;
  margin-right: 0;
}
.keywords a {
  color: lemonchiffon;
  text-decoration: none;
}
.keywords a:hover {
  text-decoration: underline;
  opacity: 0.7;
}

/* PREMIERS PARAGRAPHES INTRO */
main > p:nth-of-type(-n+3) {
  color: lemonchiffon;
  font-size: 0.9em;
  opacity: 0.6;
  font-style: italic;
  margin-left: 2em;
  margin-right: 2em;
  margin-bottom: 2em;
  text-align: left;
}

main > p:nth-of-type(-n+3) a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

main > p:nth-of-type(-n+3) span {
  display: block;
  color: lemonchiffon;
  opacity: 0.8;
  margin-top: 5px;
}

/* =========================
   BLOCKQUOTE / QUOTE
========================= */
.epigraphe,
.text .quote { 
  --font-wght: 900;
  max-width: max(75%, 23em);
  align-self: flex-end;
}

.quote {
  color: #bc2f57;
  font-size: 0.7em;
  text-align: center;
  font-style: italic;
  margin: 0.1em;
  line-height: 1.4;
  transform: rotate(-5deg);
  margin-top: 2em;
  margin-bottom: 2em;
}

/* =========================
   TABLES
========================= */
table {
  border-collapse: collapse;
}

th {
  --font-wght: 600;
}

td, th {
  padding-block: 0.5em;
  vertical-align: top;  
  text-align: left;
}

tbody tr:last-child td,
tbody tr:last-child th {
  border-bottom: none;
}

/* =========================
   FOOTER / BIO / READMORE
========================= */
.readmore, 
.biography { 
  margin-top: 5em;
  margin-left: 5ch;
  margin-right: 5ch;
  font-size: 0.8em;
  line-height: 1.4;
  border-top: 0.1em solid lemonchiffon;
  border-radius: 0.3em;
  padding: 1em 1em 1.5em;
  max-width: 70ch;
}

.readmore h3 {
  margin-left: 5ch;
  margin-right: 5ch;
  font-size: 1.1em;
  text-transform: uppercase;
  margin-bottom: 1.5em;
}

.readmore a {
  text-decoration: underline;
}

.footnotes {
  border-top: 0.1em solid lemonchiffon;
  border-bottom: 0.1em solid lemonchiffon;
  padding-top: 0.5em;
}

#footer {
  display: flex;
  flex-direction: column;
}

#footer > * {
  padding: 1.6em 1em;
}

.articles-prev-next {
  display: flex;
  gap: 1em;
  justify-content: space-between;
}

/* =========================
   PARAGRAPHS
========================= */
p {
  margin-block-start: 1em;
  margin-block-end: 1em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  unicode-bidi: isolate;
  line-height: 1.9;
  display: block;
}

/* =========================
   RESPONSIVE / MOBILE
========================= */
@media (max-width: 1024px) {
  .article {
    margin-left: 5ch;
    margin-right: 5ch;
  }

  .text {
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    font-size: 1em;
  }

  .text p,
  .text p:nth-of-type(2n) {
    transform: skewX(0deg);
  }

  h1 {
    font-size: 1.4em;
    transform: rotate(0deg);
  }

  h2, h3 {
    font-size: 1.2em;
  }

  .authors,
  .keywords,
  .footnotes {
    font-size: 0.9em;
    margin-left: 1em;
    margin-right: 1em;
  }

  .readmore,
  .biography {
    margin-left: 1em;
    margin-right: 1em;
    max-width: 95%;
  }

  .articles-prev-next {
    flex-direction: column;
    gap: 0.5em;
  }

  .top-nav {
    padding: 0.8em;
  }
}

@media (max-width: 600px) {
  .article {
    margin-left: 2ch;
    margin-right: 2ch;
  }

  .text {
    font-size: 0.95em;
    line-height: 1.5;
  }

  h1 {
    font-size: 1.2em;
  }

  h2, h3 {
    font-size: 1em;
  }

  .authors,
  .keywords,
  .footnotes {
    font-size: 0.8em;
  }

  .readmore,
  .biography {
    font-size: 0.75em;
  }
}
