:root {
    --color-1: #000000;
    --color-2: #333333;
    --accent: #666666;
    --highlight: rgba(0, 0, 0, 0);
    --tetris: rgba(0, 0, 0, 0.2);
    --font: 'Roboto', sans-serif;
    --bg-color: #ffffff;
    --link: #0071aa;
    --link-highlight: rgba(0, 113, 170, 0.4);
    --bg-nav: rgba(0, 0, 0, 0.05);
}

.dark {
    --color-1: #ffffff;
    --color-2: #e9e9e9;
    --link: #0071aa;
    --accent: #9c9c9c;
    --highlight: rgba(255, 255, 255, 0.7);
    --bg-color: rgb(30, 30, 30);
    --bg-nav: rgba(255, 255, 255, 0.05);
}

.no-crt {
    --highlight : rgba(0, 0, 0, 0);
    --link-highlight: rgba(0, 0, 0, 0);
}


body {
    margin: 0;
    background: var(--bg-color);
    color: var(--color-1);
    position: relative;
    overflow: hidden;
    line-height: 1.6;
    font-family: var(--font);

}

.content {
    position: relative;
    z-index: 1;
    padding: 20px;
    font-size: 16px;
    text-shadow: 0 0 5px var(--highlight);
}

.scroll-content {
    overflow-y: auto;
    overflow-x: hidden; /* Empêche un éventuel débordement horizontal */
    height: 85vh;
    box-sizing: border-box; /* Assure que le padding n'affecte pas la hauteur */
   
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 8%, rgba(0, 0, 0, 1) 92%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 8%, rgba(0, 0, 0, 1) 92%, rgba(0, 0, 0, 0) 100%);
    scrollbar-width: none; /* Masque la scrollbar sur Firefox */
    -ms-overflow-style: none; /* Masque la scrollbar sur IE et Edge */
}

/* Masque la scrollbar sur Chrome, Edge, Safari */
.scroll-content::-webkit-scrollbar {
    display: none;
}

/* Variante avec fondu uniquement en bas */
.no-top-fade {
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 92%, rgba(0, 0, 0, 0) 100%) !important;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 92%, rgba(0, 0, 0, 0) 100%) !important;
}


.crt-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    /* border-radius: 30px; */
    background: var(--bg-color);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

.score {
    display: none;
    position: absolute;
    top: 5%;
    right: 15%;
    font-size: 24px;
    font-weight: 600;
    z-index: 2;
    color: var(--color-1);
}

#crtCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

#tetrisCanvas {
    z-index: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    pointer-events: none;
}



.tetris {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    background: var(--tetris);
}

.center {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 20px;
    text-align: left;
}

/* Menu Styles */
.menu {
    display: flex;
    margin-bottom: 24px;
    justify-content: space-between;
}

.menu-left,
.menu-right {
    display: flex;
    gap: 20px;
}

.menu-item a {
    color: var(--color-1);
    text-decoration: none;
    font-size: 24px;
    opacity: 0.5;
    font-weight: 600;
}

.menu-item a:hover,
.menu-item a.active {
    opacity: 1;
    color: var(--color-1);
    text-shadow: 0 0 5px var(--highlight);
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Typography */
h1 {
    font-size: 24px;
    margin: 0 0 16px 0;
    font-weight: 600;
}

h2 {
    font-size: 20px;
    margin: 14px 0 14px 0;
    font-weight: 600;
}

p {
    margin: 0 0 14px 0;
    font-size: 16px;
    font-weight: 500;
}

/* Lists */
ul {
    margin: 0 0 20px 0;
    padding-left: 20px;
    list-style-type: none;
}

ul li::before {
    content: "- ";
    color: var(--accent);
    font-weight: 600;
}

a {
    color: var(--link);
    text-shadow: 0 0 2px var(--link-highlight);
    font-weight: 500;
    font-size: 16px;
}

h2 a {
    color: var(--color-1);
}

/* Code blocks */
code {
    display: block;
    background: rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    white-space: pre-wrap; /* Force le texte à être enroulé */
    word-break: break-all; /* Permet de couper les mots longs */
}

.dark code {
    background: rgba(255, 255, 255, 0.1) !important;
}

img {
    max-width: 98%;
    max-height: 500px;
    border-radius: 4px;
    align-items: center;
    margin: 0.4rem 0;
}


/* Responsive */
@media (max-width: 600px) {
    .menu {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        background: var(--bg-nav);
        padding: 16px;
    }

    .menu-left,
    .menu-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .center {
        padding: 0;
    }

    .content {
        padding: 0;
    }

    .scroll-content {
        padding: 16px;
    }

    .menu-item a {
        font-size: 22px;
    }

    .menu-item span {
        display: none;
    }

    img {
        margin: 0.25rem 0;
    }
}

/* Structure de base */
.projet-card {
    margin: 1rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.projet-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--bg-color);
    border-radius: 4px 4px 0 0;
    transition: color 0.1s ease, color 0.1s ease;
}

.projet-header:hover {
    background: var(--color-2);
    color: var(--bg-color);
}


/* Contenu du projet */
.projet-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-color);
}

.projet-content.active {
    max-height: 20000px;
    padding: 1rem;
}


/* Icône de toggle */
.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-icon.active {
    transform: rotate(180deg);
}

.settings-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style-type: none;
}

button {
    padding: 4px 8px;
    border: none;
    background: var(--bg-color);
    color: var(--color-1);
    font-size: 16px;
    cursor: pointer;
    transition: background 0.1s ease, color 0.1s ease;
}

button:hover {
    background: var(--color-1);
    color: var(--bg-color);
}

button.active {
    background: var(--color-1) !important;
    color: var(--bg-color) !important;
}

button.active:hover {
    background: var(--bg-color) !important;
    color: var(--color-1) !important;
}

.menu-item a img {
    transition: transform 0.5s ease-in-out;
}

.menu-item a:hover img {
    transform: rotate(180deg);
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(180deg);
    }
}

.menu-item a:hover img {
    animation: rotate 0.5s linear;
}

.space{
    padding-bottom: 400px;
}