/*
Theme Name: Retro Console Terminal
Description: Retro terminal WordPress theme with ASCII logo glitch and image flash effect.
Version: 6.0
*/

:root {
  --primary: #31f5f8;
  --primary2: 49,245,248;
  
  --secondary: #e05cf8;
  --accent: #ff702c;
  --white: #FFFFFF;
  --bg: #272623;
  --black: #000000;
  
  --m1: 0.5em;
  --m2: 1em;
  --m3: 3em;
  
  --bp-min: 512px;
  --bp-mobile: 768px;
  --bp-tablet: 1024px;
}

body {
  background-color: var(--bg);
  color: var(--primary);
  font-family: monospace;
  margin: 0;
  padding: 0 100px;
  font-size: clamp(15px, 1.2vw, 18px);
}

@media (max-width: 768px) {
  body {
	padding: 0 50px;
  }
}
@media (max-width: 500px) {
  body {
	padding: 0 20px;
  }
}


/* =========================
   CRT EFFECT
   ========================= */

body.crt {
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.35);
}

body.crt::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
}


/* =========================
   ASCII LOGO
   ========================= */

div.logo-container {
  text-align: center;
  margin-top: var(--m2);
}

.ascii-logo {
  display: inline-block;
  white-space: pre;
  font-family: monospace;
  font-size: 0.8rem;
  line-height: 1.1;
  letter-spacing: 0;
  margin: 0;
}

/* Optionnel : légère respiration visuelle */
.ascii-logo {
  text-shadow: 0 0 4px rgba(0, 255, 0, 0.25);
}

/* Empêche toute sélection accidentelle */
.ascii-logo {
  user-select: none;
}

/* Tablet : évite le débordement */
@media (max-width: 768px) {
  .ascii-logo {
    font-size: 0.5rem;
    overflow-x: auto;
    max-width: 100%;
  }
}
/* Small : évite le débordement */
@media (max-width: 512px) {
  .ascii-logo {
    font-size: 0.4rem;
    overflow-x: auto;
    max-width: 100%;
  }
}



/* =========================
   MENU
   ========================= */
nav {
  margin-top: var(--m2);
  margin-bottom: -11px; /* colle les onglets au cadre du main */
  text-align: center;
}
nav ul.menu {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav ul.menu > li > a {
  display: block;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--primary);;
  background: var(--bg);
  color: var(--primary);;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
nav ul.menu > li.current-menu-item > a,
nav ul.menu > li.current_page_item > a {
  background: var(--primary);;
  color: var(--bg);
  border-bottom-color: var(--bg); /* fusion avec le cadre du main */
  position: relative;
  z-index: 2;
}
nav ul.menu > li:not(.current-menu-item):not(.current_page_item) > a:hover {
  background: #000;
}
@media (max-width: 600px) {
  nav ul.menu {
    flex-wrap: wrap;
  }

  nav ul.menu > li > a {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }
}



/* =========================
   MAIN & ELEMENTS
   ========================= */
   
main {
    max-width: 1024px;
    margin: 0 auto;
	border: 3px solid rgba(var(--primary2),0.5);
    box-sizing: border-box;
	padding: 20px;
    box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 5px rgba(var(--primary2),0.5),
    0 0 4px rgba(0,255,0,0.4);
}
h1 {
	background-color: var(--primary);
    color: var(--bg);
    padding: var(--m1);
}

h2, h3, h4 {
	background-color: var(--bg);
    color: var(--primary);
}
h2::before, h3::before {
	content: "[ ";
  color: var(--accent);
}
h2::after, h3::after {
	content: " ]";
  color: var(--accent);
}
h2 {
  transition: text-shadow 0.15s ease;
}
h2:not(:hover) {
  text-shadow: 0 0 3px rgba(0,255,255,0.15);
}


table, canvas {
	margin-bottom: var(--m3);
}

a {
	color: var(--accent);
}
a:hover {
	color: var(--bg);
	background-color: var(--accent);
}



.post-content bold, .post-content strong {
  color: #00ffff;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;

}
/*
.post-content strong {
  background: rgba(0,255,255,0.08);
  padding: 0 0.2em;
  font-weight: 500;
}
*/

/* ============================
  ALL SPACING & MARGINS 
  ============================= */
  
.post-content {
  line-height: 1.6;
}
h2 {    margin: 2.5rem 0 1.2rem; }
h3 {    margin: 2.5rem 0 1.2rem; }
.post-content figure {
  margin: 1.8rem 0;
}
.post-content img {
  margin: 0;
}
.post-content p {
    margin: 0 0 1.2rem;
}    
.post-content code {
  margin: 0;
}
.post-content pre {
  margin: 1.8rem 0;
}
.post-content ul,
.post-content ol {
  margin: 1.2rem 0;
}

.post-content li {
  margin: 0.3rem 0;
}
.post-content hr {
  margin: 3rem 0;
  border: none;
  border-top: 1px dashed rgba(0,255,255,0.3);
}


/* =========================
    CODES
  ========================== */
.post-content pre {
  position: relative;
  background: #000;
  padding: 2.2rem 1rem 1rem;
  border: 1px solid rgba(0,255,255,0.35);
}

/* barre de titre */
.post-content pre::before {
  content: " terminal ";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.4rem;
  background: rgba(0,255,255,0.08);
  font-size: 0.75rem;
  line-height: 1.4rem;
  padding-left: 0.6rem;
  opacity: 0.8;
}

/* boutons */
.post-content pre::after {
  content: "●  ○  ×";
  position: absolute;
  top: 0.25rem;
  left: 0.6rem;
  font-size: 0.6rem;
  letter-spacing: 0.3rem;
  opacity: 0.6;
}

/* =========================
    IMAGES
  ========================== */
.post-content figure {
  position: relative;
  border: 1px solid rgba(0,255,255,0.35);
  padding-top: 1.4rem;
}
.post-content figure::before {
  content: " image ";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.4rem;
  background: rgba(0,255,255,0.08);
  font-size: 0.75rem;
  line-height: 1.4rem;
  padding-left: 0.6rem;
  opacity: 0.8;
}
.post-content figure::after {
  content: "●  ○  ×";
  position: absolute;
  top: 0.25rem;
  left: 0.6rem;
  font-size: 0.6rem;
  letter-spacing: 0.3rem;
  opacity: 0.6;
}



/* =========================
   FOOTER
   ========================= */

.site-footer {
    

    
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
  white-space: pre-wrap;
  margin: 0px 20px 20px 20px;
  box-sizing: border-box;
}

.site-footer::before {
  content: "";
  display: table;
  clear: both;
}



/* ==========================
	CATEGORY
	========================= */
main ul {
  list-style: none;
  padding-left: 0;
}

main ul li {
  position: relative;
  padding-left: 0;
  margin: 0.4rem 0;
  line-height: 1.4;
}

main ul li::before {
  content: "> ";
  color: #00ffff;
}



/* =============================
  SINGLE
  ======================= */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.post-content {
  grid-column: 1;
}





/* Side TOC */
.post-toc {
  grid-column: 2;
  position: sticky;
  top: 2rem;
  opacity: 0.8;
}

.post-toc ul {
  list-style: none;
  padding-left: 0;
}

.post-toc li {
  margin: 0.4rem 0;
}

.post-toc a {
  text-decoration: none;
}

.post-toc a:hover {
  text-decoration: underline;
}

.post-toc a.active {
  color: #000;
  background: #00ffff;
  padding: 0.1rem 0.3rem;
}

.post-toc a.active::before {
  content: ">";
  margin-right: 0.3rem;
}


@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-toc {
    display: none;
  }
}


/* =========================
  AUTHOR
  ======================== */
  
.author-block {
  gap: 1.2rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  border-top: 1px dashed rgba(0,255,255,0.3);
  border-bottom: 1px dashed rgba(0,255,255,0.3);
}
.author-block {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1.5rem;
  margin-top: 4rem;
  align-items: start;
}

.author-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ascii-avatar-wrapper {
  height: 150px;              /* à ajuster */
  overflow: hidden;
}

.ascii-avatar {
  font-family: monospace;
  font-size: 8px;
  line-height: 1;
  white-space: pre;

  transform: scale(0.5);
  transform-origin: top left;
  width: fit-content;
  max-width: 200px;   /* à ajuster */
  user-select: none;
}
.ascii-avatar {
  animation: ascii-flicker 4s infinite;
}
@keyframes ascii-flicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.8; }
}

.author-name {
  font-weight: 600;
  margin-left: 0;
  padding-left: 0;
  padding-top: 1em;
}
.author-name {
  transform: translateX(0);
}
.author-name::before {
  content: "@";
  opacity: 0.5;
}


.author-bubble {
    background: rgba(0, 255, 255, 0.85);
  color: var(--bg);
  padding: 1.2rem 1.4rem;
  position: relative;
  font-size: 0.85rem;
  line-height: 1.5;
}
.author-bubble {
  max-width: 600px;
}
.author-bubble::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 1.2rem;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 10px solid #00ffff;
}









