img:not(.cover-image) {
            cursor: pointer;
            transition: transform 0.3s ease;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            display: block;
            margin: 20px auto;
            max-width: 100%;
        }
img:not(.cover-image):hover {
    width:100%!important; 
    height:100%!important; 
    object-fit:cover!important; 
    object-position:center!important; 
    /* transform: scale(2);
    z-index: 1;
    overflow: hidden; 
    position: relative; */
}
a:link {
color:#ffb255;
background-color: rgb(30, 30, 30);
text-decoration: none;
}

a:visited {
color: rgb(60, 255, 122);
background-color: transparent;
text-decoration: none;
}

a:hover {
color: rgb(255, 90, 90);
background-color: transparent;
text-decoration: underline;
}

a:active {
color: orange;
background-color: rgb(30, 30, 30);
text-decoration: underline;
}
.container {
    zoom: 100%;
}


/* Updated background styles */
body {
    margin: 0;
    padding: 0;
    background: #000; /* Espace noir */
    font-family:'Libre Baskerville', serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.4;
    color: #fff;
    height: 100vh;
    zoom: 100%;
}

#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    animation: orbit 40s linear infinite; /* Keep global orbit for the field */
}

.star {
    position: absolute;
    background: #F7931A;
    border-radius: 50%;
    box-shadow: 0 0 4px 2px rgba(247, 147, 26, 0.8); /* Orange glow for star effect */
    transform-origin: center;
    animation: 
        twinkle var(--twinkle-duration) linear infinite var(--delay),
        pulse var(--pulse-duration) ease-in-out infinite var(--delay);
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulse {
    0%, 100% { transform: scale(0.8); }
    50% { transform: scale(1.2); } /* Resizing/pulsing effect */
}

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(50px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(50px) rotate(-360deg); }
}

#webgl-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3; /* Behind everything */
    pointer-events: none;
}
.book {
    width: 80vw; /* Adjusted as per new code */
    height: 80vh; /* Adjusted as per new code */
    position: relative;
    display: flex;
    transform-style: preserve-3d;
    perspective: 1200px;
    perspective-origin: center center;
    filter: drop-shadow(0 0 30px #F7931A); /* Glow holographique orange */
    overflow: hidden;
    margin: 0; /* Remove any margins */
    padding: 0;
}
 h1 {
 font-family: 'Libre Baskerville', serif;
 font-size: 2.4rem;
 text-align: center;
 color: var(--accent);
 margin-bottom: 1rem;
 }
 h2 {
 font-family: 'Libre Baskerville', serif;
 font-size: 1.6rem;
 color: var(--accent);
 border-bottom: 2px solid var(--accent);
 padding-bottom: 0.4rem;
 margin-top: 2.5rem;
 }
 p {
 margin: 1rem 0;
 font-size: 1.05rem;
 }
 blockquote {
    position: relative;
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: rgba(247,147,26,0.1);
    border-left: 5px solid var(--accent);
    font-style: italic;
    color: var(--gray);
    text-shadow: 0 0 5px rgba(247, 147, 26, 0.5); /* Glow texte */
    padding: 5px 15px 5px 45px; /* Extra left padding for the line */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
 }
 /* blockquote { */
    /* position: relative; */
    /* font-size: 16px; */
    /* color: #ffffff;  Texte orange Bitcoin */
    /* text-shadow: 0 0 5px rgba(247, 147, 26, 0.5); Glow texte */
    /* margin: 10px 0; */
    /* padding: 5px 15px 5px 45px; Extra left padding for the line */
    /* border-radius: 8px; */
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
    /* line-height: 1; */
/* }  */
blockquote::before { 
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color:  #F7931A;
    border-radius: 2px;
}

.binding {
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #F7931A, #000, #F7931A); /* Reliure virtuelle orange courbée */
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 0 10px #F7931A;
    z-index: 5;
}
.page { padding: 20px; font-size: 17px; }
.left-page, .right-page {
    position: absolute;
    width: 50%;
    height: 100%;
    background: rgba(0, 0, 0, 1); /* Fond semi-transparent pour hologramme */
    border: 1px solid #F7931A; /* Bordure néon orange */
    /* box-shadow: 
        inset 0 0 20px rgba(247, 147, 26, 0.3),
        0 0 20px rgba(247, 147, 26, 0.5); /* Glow interne et externe */
    padding: 40px;
    box-sizing: border-box;
    overflow-y: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 1s ease-in-out;
    transform-origin: center left; /* Pour left: origine à droite pour flip interne */
    z-index: 1;
    display: none; /* Hidden by default on load */
}
.left-page {
    left: 0;
    transform: rotateY(0deg);
    transform-origin: right center; /* Left page flips from right edge */
}
.right-page {
    right: 0;
    transform: rotateY(0deg);
    transform-origin: left center; /* Right page flips from left edge */
}
.left-page.flipped {
    transform: rotateY(180deg); /* Flip vers l'arrière pour left */
}
.right-page.flipped {
    transform: rotateY(-180deg); /* Flip vers l'avant pour right */
}
.page-content {
    line-height: 1.1;
    font-size: 16px;
    color: #ffffff; /* Texte orange Bitcoin */
    text-shadow: 0 0 5px rgba(247, 147, 26, 0.5); /* Glow texte */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow-y: visible;
}
.page-content-video, .page-content-image {
    display: block;
    margin: 0 auto;
    width: 40vh;
    height: 25vh;
}
.page-content-video-youtube {
    display: block;
    margin: 0 auto;
    width: 100%;
    /* height: 100%; */
    /* width: 43vh; */
    height: 30vh;

}
.page-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 20px;
    text-align: center;
    color: #fff;
    text-shadow: 0 0 10px #F7931A;
    border-bottom: 2px solid #F7931A;
    padding-bottom: 10px;
}
.page-number {
    position: absolute;
    top: 10px;
    color: #F7931A;
    font-family: 'Orbitron', monospace;
    font-weight: bold;
    font-size: 13px;
    text-shadow: 0 0 5px #F7931A;
}
.left-page .page-number {
    left: 20px;
}
.right-page .page-number {
    right: 20px;
}
.navigation {
    position: fixed;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    z-index: 200;
    pointer-events: none; /* Pour ne pas interférer avec pages */
}
.nav-arrow {
    width: 6vh;
    height: 6vh;
    background: transparent;
    color: #F7931A;
    border: 2px solid #F7931A;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    transform: translateX(0px);
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(247, 147, 26, 0.3);
    pointer-events: all;
}

.nav-arrow:hover:not(:disabled) {
    background: #F7931A;
    color: #000;
    /* box-shadow: 0 0 20px #F7931A; */
    /* transform: scale(1.1); */
}
.nav-arrow:disabled {
    border-color: #666;
    color: #666;
    box-shadow: none;
    cursor: not-allowed;
}
.left-arrow {transform: translateY(0px);}
.right-arrow {transform: translateY(0px);}
.canvas-matrix {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}
/* Vidéos aux 4 coins */
.corner-video {
    position: fixed;
    width: 10vh;
    height: 10vh;
    object-fit: cover;
    border-radius: 100%; /* Forme ronde pour effet orbital */
    box-shadow: 0 0 20px rgba(247, 147, 26, 0.5); /* Glow orange */
    z-index: -2; /* Derrière tout */
    pointer-events: none; /* Ne bloque pas les interactions */
}
.top-left { top: 20px; left: 20px; }
.top-right { top: 20px; right: 20px; }
.bottom-left { bottom: 20px; left: 20px; }
.bottom-right { bottom: 20px; right: 20px; }
/* Cover page */
.cover {
    position: absolute;
    width: 50%;
    left: 25%;
    right: 25%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.8); /* Fond semi-transparent pour hologramme */
    border: 1px solid #F7931A; /* Bordure néon orange */
    box-shadow: 
        inset 0 0 20px rgba(247, 147, 26, 0.3),
        0 0 20px rgba(247, 147, 26, 0.5); /* Glow interne et externe */
    /* padding: 40px;  */
    box-sizing: border-box;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 1s ease-in-out;
    transform-origin: center;
    z-index: 2;
}
.cover.flipped {
    transform: rotateY(-180deg);
}
.cover-video {
    width: 100vh;
    height: 65vh;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(247, 147, 26, 0.3);
}
.cover-image {
    width: 100vh;
    height: 65vh;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(247, 147, 26, 0.3);
}
.cover-title {
    top: 70vh;
    font-size: 4vmin;
    font-weight: 700;
    text-align: center;
    color: #F7931A;
    text-shadow: 0 0 10px #F7931A;
    z-index: 3;
}
.cover-title-small {
    top: 80vh;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
    color: #F7931A;
    text-shadow: 0 0 10px #F7931A;
    z-index: 3;
}
.cover-title-substack {
    top: 90vh;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
    color: #F7931A;
    text-shadow: 0 0 10px #F7931A;
    z-index: 3;

}
.page-jump {
    position: absolute;
    top: 1.75%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}
#pageInput {
    border: 2px solid #F7931A;
    background: rgba(0,0,0,0.8);
    color: #F7931A;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    min-width: 50px;
}
#pageInput:focus {
    outline: none;
    box-shadow: 0 0 10px #F7931A;
}
#goToPageBtn {
    background: #F7931A;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-weight: bold;
    transition: all 0.3s ease;
}
#goToPageBtn:hover {
    box-shadow: 0 0 10px #F7931A;
    transform: scale(1.05);
}
/* Network Map Overlay */
#network-container {
            width: 20vw;
            height: 20vh;
            overflow: hidden;
            z-index: 998;
        }
#network-container canvas {
            display: block;
            position: absolute;
            top: 0; left: 0;
            width: 100% !important;
            height: 100% !important;
            z-index: 999;                   /* canvas inside container */
            /* background is transparent → see page underneath if you want */
        }

#network-map-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 20;
    display: none;
    justify-content: center;
    align-items: center;
}
#network-map-container {
    width: 100%;
    height: 100%;
}
#map-info {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #F7931A;
    font-size: 14px;
    z-index: 25;
    background: rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 5px;
}
#close-map-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #F7931A;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 25;
    font-family: 'Orbitron', monospace;
}
#map-toggle-btn {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #F7931A;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 15;
    font-family: 'Orbitron', monospace;
    font-weight: bold;
}
/* Tooltip Styles - Updated for ? icon */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}
.tooltip .tooltiptext {
    visibility: hidden;
    width: 600px;
    background-color: #111;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    top: 125%;
    left: 50%;
    margin-left: -45px;
    margin-bottom: -45px;
    opacity: 0;
    transition: opacity 0.001s;
    border: 1px solid #F7931A;
    font-family: 'Libre Baskerville', serif;
    font-size: 0.9em;
    line-height: 1.4;
}
.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 80%;
    margin-left: -5px;
    border-width: 100px;
    border-style: solid;
    border-color: #F7931A transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
/* Footer */
.footer {
    position: fixed;
    bottom: 0px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 5;
    color: #F7931A;
    font-family: 'Orbitron', monospace;
    font-size: 15px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
.footer a {
    color: #F7931A;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}
.footer a:hover {
    color: rgb(255, 90, 90);
}
.footer .social {
    margin-top: 5px;
}
.footer .social a {
    margin: 0 15px;
    font-size: 14px;
}
/* Responsive pour mobile */
@media (max-width: 768px) {
    .book { flex-direction: column; }
    .left-page, .right-page { width: 100%; height: 50%; }
    .left-page { top: 0; }
    .right-page { bottom: 0; }
    .binding { width: 100%; height: 4px; left: 0; top: 50%; transform: translateY(-50%); }
    .page { padding: 20px; font-size: 14px; }
    .corner-video { width: 80px; height: 80px; }
    .cover-video, .cover-image { width: 80%; height: 30%; }
    .cover-title { font-size: 24px; }
    .page-number { font-size: 14px; bottom: 10px; }
    .left-page .page-number { left: 10px; }
    .right-page .page-number { right: 10px; }
}
/* Transition container */
.chapter-transition {
  margin: 3rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 16px;
  border: 1px solid #eeba30;
  color: #f0f0f0;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 8px 32px rgba(238, 186, 48, 0.15);
}

/* Timeline */
.transition-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.tl-past { color: #888; text-decoration: none; }
.tl-current { color: #eeba30; font-weight: bold; }
.tl-next { color: #fff; font-weight: 600; }
.tl-next.pulse { animation: pulse 2s infinite; }
.tl-sep { color: #eeba30; font-weight: bold; }

/* Pont conceptuel */
.transition-bridge h4 {
  margin: 0 0 0.75rem;
  color: #eeba30;
  font-size: 1.1rem;
}
.transition-bridge p {
  margin: 0;
  line-height: 1.6;
  font-size: 1rem;
}
.transition-bridge em { color: #eeba30; font-style: italic; }

/* Interlude */
.transition-interlude {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(238, 186, 48, 0.1);
  border-left: 4px solid #eeba30;
  border-radius: 0 8px 8px 0;
}
.transition-interlude summary {
  cursor: pointer;
  font-weight: 600;
  color: #eeba30;
}
.btn-interlude {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: #eeba30;
  color: #000;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: bold;
}

/* Actions */
.transition-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.btn-primary, .btn-audio {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-primary {
  background: #eeba30;
  color: #000;
  text-decoration: none;
}
.btn-primary:hover { background: #f0c050; transform: translateY(-2px); }
.btn-audio {
  background: rgba(255,255,255,0.1);
  color: #eeba30;
  border: 1px solid #eeba30;
}
.btn-audio:hover { background: rgba(238,186,48,0.2); }

/* Animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Dark mode fallback */
@media (prefers-color-scheme: light) {
  .chapter-transition {
    background: linear-gradient(135deg, #fffbe6, #fdf4e0);
    border: 1px solid #eeba30;
    color: #333;
  }
  .transition-interlude { background: rgba(238,186,48,0.15); }
}