@font-face {
    font-family: 'Play-Regular';
    src: url(../Play/Play-Regular.ttf) format('truetype');
}

:root {
    --text-color: #e6f1ff;      /* Blanc cassé */
    --font-family: 'Play-Regular';
}

html {
    background: linear-gradient(135deg, #02001a 0%, #0a0a3a 50%, #000000 100%) fixed;
    min-height: 100vh;
}

body {
    margin: 0;
    padding: 3px;
    min-height: 100vh;
    background: transparent;
    font-family: Play-Regular, math;
    font-size: 16px;
    color: var(--text-color);
    isolation: isolate;
}

/* --- Effet Ciel Étoilé Animé --- */
html::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Ccircle cx='40' cy='80' r='1.2' fill='%23fff'/%3E%3Ccircle cx='150' cy='30' r='1.5' fill='%23fff'/%3E%3Ccircle cx='250' cy='120' r='1' fill='%23fff'/%3E%3Ccircle cx='90' cy='200' r='1.8' fill='%23fff'/%3E%3Ccircle cx='220' cy='260' r='1.2' fill='%23fff'/%3E%3Ccircle cx='50' cy='280' r='1' fill='%23fff'/%3E%3C/svg%3E");
    background-size: 300px 300px;
    animation: twinkle1 4s infinite ease-in-out;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Ccircle cx='100' cy='100' r='1.5' fill='%23fff'/%3E%3Ccircle cx='250' cy='50' r='1' fill='%23fff'/%3E%3Ccircle cx='350' cy='200' r='2' fill='%23fff'/%3E%3Ccircle cx='150' cy='300' r='1.2' fill='%23fff'/%3E%3Ccircle cx='50' cy='350' r='1' fill='%23fff'/%3E%3Ccircle cx='300' cy='360' r='1.5' fill='%23fff'/%3E%3C/svg%3E");
    background-size: 400px 400px;
    animation: twinkle2 3s infinite ease-in-out;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500'%3E%3Ccircle cx='200' cy='150' r='1.2' fill='%23fff'/%3E%3Ccircle cx='50' cy='50' r='1' fill='%23fff'/%3E%3Ccircle cx='400' cy='80' r='1.5' fill='%23fff'/%3E%3Ccircle cx='300' cy='250' r='1' fill='%23fff'/%3E%3Ccircle cx='100' cy='400' r='1.2' fill='%23fff'/%3E%3Ccircle cx='450' cy='450' r='1.5' fill='%23fff'/%3E%3C/svg%3E");
    background-size: 500px 500px;
    animation: twinkle3 5s infinite ease-in-out;
}

@keyframes twinkle1 {
    0% { opacity: 0.2; }
    50% { opacity: 1; }
    100% { opacity: 0.2; }
}

@keyframes twinkle2 {
    0% { opacity: 1; }
    50% { opacity: 0.1; }
    100% { opacity: 1; }
}

@keyframes twinkle3 {
    0% { opacity: 0.1; }
    33% { opacity: 0.8; }
    66% { opacity: 0.1; }
    100% { opacity: 0.5; }
}

h1 {
    display: flex;
    justify-content: center;
    color: var(--text-color);
    margin-bottom: 30px;
    font-size: 3em;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    text-align: center;
}

h2 {
    color: var(--text-color);
    border-bottom: 2px solid var(--text-color);
    padding-bottom: 5px;
    display: inline-block;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.text-italic {
    font-style: italic;
    font-size: 12px;
    display: flex;
    justify-content: center;
    color: rgba(230, 241, 255, 0.7);
    margin-top: 10px;
}

.indent {
    text-indent: 2em;
    margin-bottom: 1em;
}

/* --- Style d'exploration / Articles / Code --- */
.index-main {
    background-color: transparent;
    box-shadow: none;
    margin-bottom: 50px;
    padding: 0;
    max-width: 1000px;
    margin: 0 auto;
}

.scroll-section {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.25em;
    padding: 20px;
    width: 100%;
}

.scroll-section h1 {
    font-size: 3.5em;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    margin: 0 0 20px 0;
}

.scroll-section h2 {
    font-size: 2.2em;
    margin-bottom: 20px;
}

.scroll-section p {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    line-height: 1.8;
    text-align: justify;
    width: 80%;
    max-width: 900px;
    margin: 10px 0;
}

.code-container {
    width: 95%;
    max-width: 900px;
    text-align: left;
    margin-top: 30px;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
    border-radius: 10px;
    overflow-x: auto;
    background: #272822; /* Fallback Prism Okaidia */
}

.code-container pre {
    margin: 0 !important;
    padding: 20px !important;
    font-size: 0.9em;
    border-radius: 0 !important;
}

/* --- Cubes 3D --- */

/* Conteneur principal pour les trois cubes */
.cube-wrapper {
    display: flex;
    flex-direction: column; /* Empile les cubes verticalement */
    align-items: center; /* Centre les cubes horizontalement */
    gap: 20px; /* Espacement vertical entre les cubes */
    margin: 2rem auto;
}

/* Conteneur individuel pour chaque cube */
.cube-single-container {
    width: 95%; /* Largeur adaptée à la plupart des écrans */
    max-width: 1500px; /* Largeur maximale pour éviter un cube trop large */
    height: 500px; /* Hauteur fixe pour les cubes */
    background: linear-gradient(to bottom, #0E2982, #AE95F4);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
}

.label {
    color: white;
    font-family: Play-Regular, math;
    font-size: 16px;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    pointer-events: none;
    user-select: none;
    position: absolute;
    z-index: 100;
}

/* Étiquettes permanentes sur les cubes (Mobile) */
.mobile-face-label {
    display: none;
    transition: opacity 0.2s ease-in-out;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-end;
    }
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    .cube-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .cube-single-container {
        width: 80%;
        margin-bottom: 20px;
    }

    .mobile-face-label {
        display: block;
    }

    .scroll-section p {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .navbar a {
        padding: 0.25rem 0.5rem;
        font-size: 0.9rem;
    }
    h1 {
        font-size: 1.75rem;
    }
    #italic {
        font-size: 11px;
    }
    .cube-single-container {
        width: 95%; /* Prend presque toute la largeur */
        height: 300px; /* Hauteur réduite pour les mobiles */
    }
}