:root {
    --primary-dark: #29282f;
    --primary-darker: #1f1e24;
    --primary-light: #b3acac;
    --primary-lighter: #d0d0d0;
    --text-dark: #222128;
    --text-light: #bababa;
    --text-lighter: #d0d0d0;
    --accent-green: #24913d;
    --accent-green-dark: #165a26;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--primary-dark);
    overflow-x: hidden;
}

/* Header */
header {
    background: var(--primary-dark);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 20px;
    box-shadow: 0 2px 20px rgba(255, 255, 255, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    max-width: 1400px;
    margin: 0 auto;
    /* position: relative; */
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--accent-green);
}

.header-descr {
    color: var(--text-light);
    margin-left: 100px;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s ease;
}

.header-descr:hover{
    color: var(--accent-green);
}
.nav-links a:hover,
#toggleNavLink:hover {
    color: #caa204;
}

/* Tutoriel */
.nav-links a[href="documentation.html"]:hover {
    color: #2b7bad;
}

.nav-links a[href="equipe.html"]:hover {
    color: #e17a14;
}

/* Menu burger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Sections */
.section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 40px;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s ease, transform 1s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section Home */
#home,
#documentation,
#equipe {
    background: radial-gradient(circle at top, #2f2e36, var(--primary-dark));
    text-align: center;
}

#home h1,
#documentation h1,
#equipe h1 {
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 2.5rem;
}

.documentation-wrapper{
    max-width: 1400px;
    width: 100%;
    /* margin-bottom: 40px; */
    display: flex;
    gap: 0;
    position: relative;
}

.sidebar-toggle {
    position: fixed;
    left: 20px;
    top: 120px;
    background-color: var(--accent-green);
    color: var(--text-lighter);
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.sidebar-toggle:hover {
    background-color: var(--accent-green-dark);
    transform: scale(1.05);
}

.sidebar {
    position: fixed;
    left: -320px;
    top: 100px;
    width: 280px;
    height: calc(100vh - 120px);
    background-color: var(--primary-light);
    padding: 30px 20px;
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    transition: left 0.4s ease;
    z-index: 99;
}

.sidebar.active {
    left: 0;
}

.sidebar h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-green);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
}

.sidebar nav a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 10px 12px;
    margin: 4px 0;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.sidebar nav a:hover {
    background-color: rgba(36, 145, 61, 0.1);
    border-left-color: var(--accent-green);
    padding-left: 16px;
}

.sidebar nav a.active {
    background-color: rgba(36, 145, 61, 0.15);
    border-left-color: var(--accent-green);
    font-weight: 600;
}

.cards-container {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.content-card {
    background-color: var(--primary-light);
    flex: 1;
    min-width: 300px;
    color: var(--text-dark);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.content-card h2 {
    margin-bottom: 15px;
}

.downloadButton {
    padding: 20px 40px;
    margin-top: 30px;
    background-color: var(--accent-green);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-lighter);
    font-size: 20px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.downloadButton:hover {
    background-color: var(--accent-green-dark);
}

.downloadButton:disabled {
    background-color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.downloadButton:disabled:hover {
    background-color: #666;
}

.mobile-warning {
    color: var(--text-light);
    margin-top: 15px;
    font-size: 0.95rem;
    background: rgba(255, 165, 0, 0.15);
    padding: 12px 20px;
    border-radius: 8px;
    border-left: 4px solid #ff9800;
    max-width: 400px;
}

.scroll-arrow-up,
.scroll-arrow-down {
    margin-top: 60px;
    font-size: 3rem;
    color: var(--text-light);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: bounce 2s infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-arrow-up:hover,
.scroll-arrow-down:hover {
    opacity: 1;
    transform: translateY(5px);
}

.scroll-arrow-up::after {
    content: "Revenir en haut";
    display: block;
    font-size: 0.8rem;
    margin-top: 10px;
    opacity: 0.8;
}

.scroll-arrow-down::before {
    content: "Découvrir le tutoriel";
    display: block;
    font-size: 0.8rem;
    margin-top: 10px;
    opacity: 0.8;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* Section Tutorial */
#tutorial {
    background: linear-gradient(180deg, var(--primary-darker), #0f0f12);
    color: var(--text-light);
}

#tutorial h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

#tutorial p {
    max-width: 800px;
    font-size: 1.1rem;
    margin-bottom: 30px;
    text-align: center;
}

#tutorial ul {
    list-style: none;
    max-width: 600px;
    text-align: left;
}

#tutorial ul li {
    padding: 15px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--accent-green);
}

/* Section Documentation */
.documentation-container {
    max-width: 1400px;
    width: 100%;
    margin-bottom: 40px;
}

.readme-content {
    flex: 1;
    background-color: var(--primary-light);
    color: var(--text-dark);
    padding: 50px 60px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    line-height: 1.8;
    text-align: left;
}

.readme-content h1 {
    color: var(--text-dark) !important;
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--accent-green);
    text-align: center;
}

.readme-content h2 {
    color: var(--text-dark) !important;
    font-size: 1.5rem;
    margin-top: 35px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(36, 145, 61, 0.3);
    text-align: left;
}

.readme-content h3 {
    color: var(--text-dark) !important;
    font-size: 1.2rem;
    margin-top: 25px;
    margin-bottom: 12px;
    text-align: left;
}

.readme-content p {
    margin-bottom: 15px;
    text-align: left;
    max-width: 75ch;
}

.readme-content ul,
.readme-content ol {
    margin: 15px 0 15px 10px;
    padding-left: 30px;
    text-align: left;
}

.readme-content li {
    margin: 10px 0;
    line-height: 1.8;
    text-align: left;
}

.readme-content ul li {
    list-style-type: disc;
}

.readme-content ol li {
    list-style-type: decimal;
}

/* Checkbox */
.readme-content ul li {
    position: relative;
    padding-left: 10px;
}

.readme-content input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent-green);
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    margin-right: 10px;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.readme-content ul li:has(input[type="checkbox"]) {
    list-style-type: none;
    margin-left: -20px;
}

.readme-content input[type="checkbox"]:checked {
    background-color: var(--accent-green);
    border-color: var(--accent-green);
}

.readme-content input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.readme-content input[type="checkbox"]:hover {
    border-color: var(--accent-green-dark);
    box-shadow: 0 0 5px rgba(36, 145, 61, 0.3);
}

.readme-content a {
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.readme-content a:hover {
    color: var(--accent-green-dark);
    text-decoration: underline;
}

.readme-content code.inline-code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: #c7254e;
}

.readme-content pre {
    background: linear-gradient(135deg, #1a1a1f 0%, #2a2a2f 100%);
    color: var(--text-lighter);
    padding: 25px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 25px 0;
    border-left: 4px solid var(--accent-green);
    text-align: left;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}


.readme-content pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35px;
    background: rgba(36, 145, 61, 0.1);
    border-bottom: 1px solid rgba(36, 145, 61, 0.3);
    border-radius: 10px 10px 0 0;
}

.readme-content pre code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    line-height: 1.6;
    color: #e0e0e0;
    display: block;
    margin-top: 25px;
}

.readme-content hr {
    border: none;
    border-top: 2px dashed rgba(255, 255, 255, 0.1);
    margin: 30px 0;
}

.readme-content strong {
    font-weight: 700;
    color: var(--text-dark) !important;
}

.readme-content blockquote {
    border-left: 4px solid var(--accent-green);
    padding-left: 20px;
    background: rgba(36, 145, 61, 0.08);
    border-left-width: 5px;
    margin: 20px 0;
    font-style: italic;
    color: rgba(34, 33, 40, 0.8);
    background-color: rgba(0, 0, 0, 0.03);
    padding: 15px 20px;
    border-radius: 4px;
}

.readme-content em {
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-dark);
}

.error-message {
    background-color: rgba(255, 0, 0, 0.1);
    border-left: 4px solid #ff4444;
    padding: 20px;
    border-radius: 8px;
}

.error-message h2 {
    color: #ff4444;
    margin-bottom: 10px;
}

.error-message p {
    color: var(--text-dark);
}


/* Footer */
footer {
    background: linear-gradient(180deg,
            rgba(31, 30, 36, 0.95),
            rgba(20, 20, 24, 1));
    color: var(--text-light);
    padding: 2.5rem 20px;
    font-size: 0.9rem;
    box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.6);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.footer-block {
    flex: 1;
}

.footer-left {
    display: flex;
    align-items: center;
}

.footer-logo {
    height: 52px;
    width: auto;
    opacity: 0.95;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
    opacity: 1;
}

.footer-center {
    text-align: center;
    line-height: 1.6;
}

.footer-center strong {
    color: var(--accent-green);
}

.footer-right {
    text-align: right;
    font-size: 0.85rem;
    opacity: 0.85;
}


/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .header-descr {
        display: none;
    }

    nav {
        padding: 1rem 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: var(--primary-darker);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        /* transition: right 0.4s ease; */
        /* box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5); */
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

        #toggleNavLink:hover {
            color: #ffcc00;
        }
        /* Tutoriel */
        .nav-links a[href="documentation.html"]:hover {
            color: #00ffcc;
        }
        .nav-links a[href="equipe.html"]:hover {
            color: #ff6699;
        }

    /* .nav-links li a:hover {
        color: #c6b21b;
    } */

    .cards-container {
        flex-direction: column;
    }

    .logo {
        font-size: 1.3rem;
    }

    h1,
    #tutorial h2 {
        font-size: 2rem;
    }

    .content-card {
        padding: 20px;
    }

    .downloadButton {
        padding: 15px 30px;
        font-size: 18px;
    }

    .scroll-arrow-up,
    .scroll-arrow-down {
        font-size: 2.5rem;
        margin-top: 40px;
    }

    #tutorial ul li {
        font-size: 0.95rem;
        padding: 12px;
    }

    .readme-content {
        padding: 30px;
    }

    .readme-content h1 {
        font-size: 1.8rem;
    }

    .readme-content h2 {
        font-size: 1.5rem;
    }

    .readme-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        width: 80%;
    }

    .section {
        padding: 100px 15px 30px;
    }

    h1,
    #tutorial h2 {
        font-size: 1.6rem;
    }

    .content-card {
        padding: 15px;
        min-width: 100%;
    }

    .content-card h2 {
        font-size: 1.3rem;
    }

    .content-card p {
        font-size: 0.9rem;
    }

    .downloadButton {
        padding: 12px 25px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
    }

    #tutorial p {
        font-size: 1rem;
    }

    .readme-content {
        padding: 20px;
    }

    .readme-content h1 {
        font-size: 1.5rem;
    }

    .readme-content h2 {
        font-size: 1.3rem;
    }

    .readme-content pre {
        padding: 15px;
        font-size: 0.85em;
    }
}

/* ---------- */
/* Equip part */

.equip-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--text-dark);
}

.card-image {
    width: 256px;
    max-width: 256px;
    object-fit: cover;
    display: block;
    margin-bottom: 1rem;
    border-radius: 4px; /* can be a full circle with 50% */
    flex-shrink: 0;
}

.equip-card .card-content {
    flex: 1;
}

.equip-card.image-right {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    .equip-card {
        flex-direction: column !important;
        text-align: center;
    }

    .equip-card .card-content {
        order: 2;
    }

    .card-image {
        width: 140px;
        height: 140px;
    }
}

/* ----------------------------------------- */
/* brouillon - a supr */