/* ============== VARIABLES ============== */
:root {
  --site-bg: url("/images/jonquil.jpeg");
  --post-bg: #FCFBF7;
  --post-text: #36342F;
  --post-header-text: #71714b;
  --border-color: #71714b;
  --border-shadow: #71714b;

  --sidebar-text: #f2eee8;
  --sidebar-bg: #71714b;
  --sidebar-button-bg: #97a24d;
  --sidebar-button-bg-hover: #dab260;
  --sidebar-button-text: #dab260;
  --sidebar-button-text-hover: #0E130F;
  --sidebar-border-color: #dab260;

  --pinned-text: #d4dddd;
  --pinned-bg: #537485;
  --button-bg: #d4dddd;
  --button-bg-hover: #e2cb78;
  --button-bg-selected: #e2cb78;
  --button-text: #4E223D;
  --button-text-hover: #e2cb78;
  --button-border-color: #e2cb78;

  --selected-bg: #71714b;
  --selected-text: #e2cb78;
}

/* ============== BASE ============== */
html {scroll-behavior: smooth;}
::selection {
  background: var(--selected-bg);
  color: var(--selected-text);
}
* {
  box-sizing: border-box;
  scrollbar-color: var(--post-header-text) var(--post-bg);
  scrollbar-width: thin;
}

body {
  font-family: 'Atkinson Hyperlegible', Verdana, Tahoma, sans-serif;
  font-size: 16px;
  margin: 0;
  background: var(--site-bg);
  color: var(--post-text);
  line-height: 1.6em;
  background-attachment: fixed;
}

.center {text-align: center;}
.small-text {font-size: smaller;}
.flex {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
}

/* ============== CONTAINER GLOBAL + HEADER (A) ============== */
#all {
  width: 1100px;
  position: relative;
  margin: 0 auto;
}

#header {
  background-color: #4E4B44;
  color: #d9d3c5;
  font-family: 'Special Elite', serif;
  border-radius: 0 0 7px 7px;
  width: 900px;
  height: 105px;
  margin: 0 auto 20px auto;
  box-shadow: 5px 5px #302A27;
  position: relative;
}

#header h1 {
  margin: 0;
  font-weight: normal;
  text-align: center;
  font-size: 40px;
  line-height: 105px;
  text-shadow: 3px 3px #302A27;
}

#img {
  background-image: url('https://i.imgur.com/qnZzOWz.png');
  position: absolute;
  top: 8px;
  right: -40px;
  width: 175px;
  height: 175px;
  z-index: 2;
}

/* ============== LAYOUT 3 COLONNES ============== */
#maincontainer {
  /* décalage pour laisser de la place à la sidebar fixe */
  margin-left: 105px;
  margin-right: 100px;
  display: block;
  grid-template-columns: 1fr 260px; /* CENTRE / DROITE seulement */
  column-gap: 20px;
  margin-top: 20px;
  min-height: 100vh;
}

/* ============== SIDEBAR GAUCHE (#nav) ============== */
#nav {
  background: var(--sidebar-bg);
  padding: 2em 1em;
  width: 305px;
 border-inline: 2px dashed var(--sidebar-border-color);
  outline: 4px solid var(--sidebar-bg);
  border-radius: 0 7px 7px 0; /* coin arrondi à droite seulement */
  overflow-y: auto;
  color: var(--sidebar-text);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
}

#nav a {color: var(--sidebar-text);}
#nav h1 a {
  font-size: 0.85em;
  text-decoration: none;
}

#icon {margin: auto;}
#icon img {
  border-radius: 50%;
  max-width: 100px;
  height: auto;
}
#icon a img {
  outline: 2px solid var(--sidebar-bg);
  transition: .2s;
}
#icon a img:hover {
  outline: 2px solid var(--sidebar-text);
  outline-offset: 4px;
}

#profile p {
  margin-block: .3em;
  line-height: 1.5em;
}
#bio {
  border-block: 2px dashed var(--sidebar-border-color);
  padding-block: .5em;
  margin-block: 1em;
  font-size: 0.8em;
}

/* nav boutons arrondis (B) */
#nav nav ul {
  text-align: center;
  margin-top: 0;
  margin-bottom: 0.6em;
  padding: 0;
  list-style-type: none;
  display: inline;
  gap: 8px;
  justify-content: space-evenly;
}
#nav nav li a {
  min-width: 120px;
  display: inline-block;
  background: var(--sidebar-button-bg);
  color: var(--sidebar-button-text);
  font-weight: bold;
  border-radius: 1rem;
  outline: 2px solid #fff0;
  transition: .2s;
  text-decoration: none;
}
#nav nav li a:visited {color: var(--sidebar-text);}
#nav nav li a:hover {
  background: var(--sidebar-button-bg-hover);
  color: var(--sidebar-button-text-hover);
  outline: 2px solid var(--sidebar-text);
  outline-offset: 3px;
}
#nav nav {margin-block: 1.5em;}

#nav li {
  list-style-image: url("/images/jonquil.png");
}

/* ============== POSTS (colonne centrale) ============== */
.postcontainer {
  width: 100%;
}

.post {
  background: var(--post-bg);
  color: var(--post-text);
  border-radius: 1rem;
  padding: 0 .8rem .8rem .8rem;
  margin-bottom: 1em;
  box-shadow: 2px 2px 6px var(--border-shadow);
}

.post-header {
  color: var(--post-header-text);
  font-weight: bold;
  padding: .5rem 0;
  border-bottom: 2px dashed var(--border-color);
}
.post time {
  float: right;
  font-weight: normal;
  font-size: smaller;
  margin: .2em;
}

.post img {max-width: 100%;}

.tags {
  border-top: 2px dashed var(--border-color);
  padding: .4em 0;
}
.tags a {color: var(--post-text);}
.tags span {color: var(--post-header-text);}
.tags a,
.tags span {
  font-size: small;
  padding: .2em .5em;
  border-radius: 1em;
  text-decoration: none;
}
.tags a:hover {
  background: var(--button-bg);
  text-decoration: underline;
  
}
/*css for hiding posts*/
.tagged:has(input:checked) article {display: none;}

/*add new tags to filter here!
 * follow the class naming conventions (no spaces, don't start it with a number)
 * remember on the actual page you can write the tag however you want!*/
.tagged:has(#all:checked) article,
.tagged:has(#PoDG:checked) article[class~="PoDG"],
.tagged:has(#personal:checked) article[class~="personal"],
.tagged:has(#secret:checked) article[class~="secret"],
.tagged:has(#art:checked) article[class~="art"] {display: inline-block;}

/* ============== BOUTONS NAVIGATION HORIZONTAUX ============== */
#main-nav {
  margin: 20px 0;
  text-align: center;
}

#main-nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;          
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

#main-nav li a {
  min-width: 80px;        
  display: inline-block;
  background: white !important; 
  color: black !important;    
  font-weight: bold;
  border-radius: 1rem;
  padding: 0.5em 1.2em;  
  transition: .2s;
  text-decoration: none;
  border: 2px solid transparent;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.3);  
}

#main-nav li a:hover {
  background: var(--sidebar-button-bg-hover) !important;
  color: var(--sidebar-button-text-hover) !important;
  outline: 2px solid var(--sidebar-text);
  outline-offset: 2px;
  transform: translateY(-2px); 
}


/* ============== COLONNE DROITE (#right-column) ============== */
#right-column {
  position: fixed;
  right: 0;
  top: 0;
  width: 260px;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

/* blocs pinned (status, filtres) */
.pinned {
  background: var(--pinned-bg);
  font-size: smaller;
  padding: .5em;
  border-radius: 1em;
  margin: 1em 0;
  border: 2px solid var(--border-color);
  outline: 2px solid var(--post-bg);
  box-shadow: 2px 2px 6px var(--border-shadow);
}

.pinned summary {
  color: var(--sidebar-text);
  font-size: 1.5em;
  font-weight: bold;
  border-bottom: 2px dashed var(--border-color);
  margin: .5em;
  cursor: pointer;
}
.pinned time {
  font-family: 'Atkinson Hyperlegible', Verdana, Tahoma, sans-serif;
  float: right;
  font-weight: normal;
  font-size: small;
}
/* ZONE TEXTE dans colonne droite */
.text-zone h3 {
  color: var(--sidebar-text);
  font-size: 1.2em;
  margin: 0.5em 0 0.5em 0.5em;
  font-weight: bold;
  border-bottom: 1px dashed var(--border-color);
}

.text-content {
  background: var(--post-bg);
  padding: 1em;
  border-radius: 0.5em;
  margin: 0.5em;
  min-height: 150px;  /* hauteur minimale */
}

.text-content p {
  margin: 0.3em 0;
  line-height: 1.5em;
  color: var(--post-text);
}


/* liste status */
#status ul {
  background: var(--post-bg);
  margin: .2em;
  padding: .2em;
  border-radius: .2em;
}
#status li {
  list-style-type: none;
  padding: .2em;
  padding: .1em;    
  font-size: 0.9em; 
}
#status li:nth-child(odd) {
  font-weight: bold;
  font-size: 1em;
  color: var(--post-header-text);
}
#status li:nth-child(even) {
  background: var(--pinned-bg);
  color: var(--pinned-text);
  border-radius: .2em;
  padding-inline: .5em;
}
#status li a {color: var(--pinned-text);}
#status li a:hover {text-decoration: none;}

/* tag filters */
#tag-filters label {
  background: var(--button-bg);
  border: 1px solid var(--button-border-color);
  border-radius: .5em;
  display: inline-block;
  margin-left: .5em;
  margin-block: .3em;
  padding: 0 .8em 0 .1em;
  cursor: pointer;
}
#tag-filters label:hover {
  background: var(--button-bg-hover);
  text-decoration: underline;
}
#tag-filters label:has(input:checked) {
  background: var(--button-bg-selected);
  color: var(--button-text);
  text-decoration: underline;
  font-weight: bold;
}
#tag-filters label:has(input:checked):hover {
  background: var(--button-bg-hover);
  text-decoration: none;
}
#tag-filters input {appearance: none;}

/* ============== LIENS GLOBAUX ============== */

a:not(#main-nav a),
a:not(#main-nav a):visited {
  color: #d9d3c5;
  text-decoration: none;
}
a:not(#main-nav a):hover {
  color: #d9d3c5;
  font-style: italic;
}
a:not(#main-nav a):active {
  color: #d9d3c5;
  font-style: italic;
  font-weight: bold;
}


/* ============== FOOTER ============== */
footer {
  color: var(--sidebar-text);
  background: var(--sidebar-bg);
  margin-top: 1em;
  padding: .5em;
  text-align: center;
  font-size: small;
}

/* ============== RESPONSIVE SIMPLE ============== */
@media only screen and (max-width: 900px) {
  #all {
    width: 100%;
    margin: 0;
  }
  #maincontainer {
    display: block;
  }
  #nav {
    position: static;
    width: 100%;
    height: auto;
    border-inline: none;
    outline: none;
  }
  #right-column {
    margin-top: 1em;
  }
}
