/* =========================================================
   BASE
   ========================================================= */

.projects > h2 {
    font-size: xx-large;
    padding: 1% 0 3% 1%;
}

.header-project > h3 {
    font-size: xx-large;
}

h5 {
    font-size: large;
}

ul,
ol {
    list-style: inside;
    padding-left: 10px;
}


/* =========================================================
   LAYOUT GLOBAL
   ========================================================= */

.projects-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
}


/* =========================================================
   NAVIGATION DES PROJETS
   ========================================================= */

.projects-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-btn {
    padding: 14px;
    border-radius: 0 10px 10px 0;
    background: var(--bg-sidebar);
    color: var(--text-light);
    border: none;
    font-weight: 600;
    text-align: left;
}

.project-btn.active {
    background: var(--accent-project);
}


/* =========================================================
   PROJET (CONTENEUR)
   ========================================================= */

.project {
    display: none;
    flex-direction: column;
    gap: 32px;
    padding: 0 36px 36px;
    margin-top: -30px;
    height: calc(100vh - 180px);
    overflow-y: auto;

    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.15);
}

.project.active {
    display: flex;
    animation: fadeUp 0.4s ease;
}

.header-project {
    margin-top: 20px;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}


/* =========================================================
   STEP BAR
   ========================================================= */

.steps {
    position: sticky;
    top: 0;
    z-index: 20;

    display: flex;
    gap: 16px;
    padding: 10px 0 12px 50px;
    margin-left: -50px;
    margin-top: -20px;

    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.step {
    position: relative;
    padding-left: 18px;

    font-size: large;
    background: none;
    border: none;
    color: var(--text-muted);
}

.step::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    transform: translateY(-50%);
}

.step.active {
    color: var(--accent-project);
    font-weight: 600;
}


/* =========================================================
   CONTENU DES ÉTAPES
   ========================================================= */

.project-step {
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-margin-top: 80px;
}

.project-step h4 {
    font-size: x-large;
}

p {
    text-align: justify;
    hyphens: auto;
}


/* =========================================================
   GALLERY
   ========================================================= */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 14px;
    cursor: var(--cursor-select), pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.titre > img {
    width: 25%;
    height: auto;
    object-fit: cover;
    border-radius: 14px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery img:hover {
    transform: scale(1.02);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.gallery .bigger {
    width: 160%;
}

/* =========================================================
   CODE BLOCK (DEV / TERMINAL STYLE)
   ========================================================= */

.code-block {
    margin-top: 20px;
    position: relative;
    background: #0f172a; /* bleu très sombre */
    border-radius: 14px;
    padding: 18px 18px 18px 18px;
    overflow-x: auto;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Barre du haut (style IDE) */
.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

/* Faux boutons macOS */
.code-dots {
    display: flex;
    gap: 8px;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dots .red { background: #ff5f56; }
.code-dots .yellow { background: #ffbd2e; }
.code-dots .green { background: #27c93f; }

/* Badge langage */
.code-lang {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contenu du code */
.code-block pre {
    margin: 0;
    color: #e5e7eb;
    white-space: pre;
}

/* Scrollbar custom */
.code-block::-webkit-scrollbar {
    height: 8px;
}
.code-block::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

/* =========================================================
   LANGAGES (couleurs)
   ========================================================= */

.code-bash .code-lang {
    background: #1f2933;
    color: #38bdf8;
}

.code-python .code-lang {
    background: #1e293b;
    color: #facc15;
}

.code-js .code-lang {
    background: #1e293b;
    color: #f59e0b;
}

.code-html .code-lang {
    background: #1e293b;
    color: #fb7185;
}

.code-css .code-lang {
    background: #1e293b;
    color: #60a5fa;
}


/* =========================================================
   LIGHTBOX
   ========================================================= */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);

    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;

    font-size: 42px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .projects-layout {
        grid-template-columns: 1fr;
    }

    .projects-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .project {
        height: auto;
    }
}
