#project-view {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 72vh;
    z-index: 150;
    transform: translateY(100vh);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: 1fr;
    will-change: transform;
}

.project-image-container {
    grid-column: 1 / 3;
    padding: 0 1vw;
    height: 100%;
}

#project-view-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform, opacity;
}

.project-info {
    grid-column: 3 / 6;
    position: relative;
    height: 72vh;
}

.project-info-scroll {
    position: absolute;
    inset: 0 1vw 5.5vh 2vw;
    overflow-y: auto;
    scrollbar-width: none;
}

.project-info-scroll::-webkit-scrollbar {
    display: none;
}

body.project-open {
    overflow: hidden;
}

body.project-open > *:not(#project-view) {
    pointer-events: none;
}

body.project-open #project-view {
    pointer-events: auto;
}

.project-info-header {
    margin-bottom: 1.5vh;
}

.project-section:last-child {
    padding-bottom: 2vh;
}

#project-view-title {
    font-size: 2.8vw;
    font-weight: 600;
    margin-bottom: 0.5vh;
    color: #fff;
    will-change: transform, opacity;
}

.project-subtitle {
    font-size: 1.1vw;
    color: rgba(255,255,255,0.5);
    margin-bottom: 1vh;
    font-style: italic;
}

.project-desc {
    font-size: 1.1vw;
    line-height: 1.6;
    color: #e0e0e0;
    margin-bottom: 2vh;
}

.project-desc p {
    margin: 0 0 0.8em;
}

.project-desc p:last-child {
    margin-bottom: 0;
}

.desc-img-wrap {
    margin: 1.2vh 0;
    display: block;
}

.desc-img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 28vh;
    border: 1px solid rgba(255,255,255,0.08);
}

.desc-img-caption {
    display: block;
    font-size: 0.75vw;
    color: rgba(255,255,255,0.3);
    margin-top: 0.4vh;
    font-style: italic;
    letter-spacing: 0.03em;
}

/* Sections */

.project-section {
    margin-bottom: 2vh;
}

.project-section-title {
    font-size: 0.8vw;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0.8vh;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 0.4vh;
}

/* Listes */

.project-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4vh;
}

.project-list li {
    font-size: 1vw;
    color: #ccc;
    padding-left: 1em;
    position: relative;
    line-height: 1.4;
}

.project-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: rgba(255,255,255,0.3);
}

.project-list--results li {
    color: #fff;
    font-weight: 500;
}

.project-list--results li::before {
    content: "✓";
    color: #7ec88e;
}

/* Preuves */

.preuves-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6vh;
}

.preuve-item {
    display: flex;
    align-items: flex-start;
    gap: 1vw;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.6vh 0.8vw;
}

.preuve-ref {
    font-size: 0.75vw;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    min-width: 4.5vw;
    padding-top: 0.1vh;
}

.preuve-intitule {
    font-size: 0.9vw;
    color: #ddd;
    line-height: 1.3;
}

.preuve-meta {
    font-size: 0.75vw;
    color: rgba(255,255,255,0.35);
    margin-top: 0.2vh;
}

/* Auto-évaluation */

.autoeval-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4vh;
}

.autoeval-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1vw;
    padding: 0.4vh 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.autoeval-key {
    font-size: 0.85vw;
    color: rgba(255,255,255,0.5);
    text-transform: capitalize;
}

.autoeval-val {
    font-size: 0.8vw;
    font-weight: 600;
    padding: 0.2vh 0.6vw;
    border-radius: 2px;
}

.val-high {
    background: rgba(126,200,142,0.15);
    color: #7ec88e;
    border: 1px solid rgba(126,200,142,0.3);
}

.val-medium {
    background: rgba(255,196,100,0.1);
    color: #ffc464;
    border: 1px solid rgba(255,196,100,0.25);
}

/* Bouton fermer */

#close-project {
    position: absolute;
    bottom: 0;
    left: 2vw;
    padding: 1.2vh 2.5vw;
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 1vw;
    transition: all 0.3s ease;
}

#close-project:hover {
    background: white;
    color: #0c0c0c;
    border-color: white;
}

/* Responsive */

@media (max-width: 1024px) {
    #project-view {
        height: 70vh;
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        overflow-y: auto;
    }
    .project-image-container {
        grid-column: 1;
        height: 30vh;
    }
    .project-info {
        grid-column: 1;
    }
    .project-info-scroll {
        inset: 0 4vw 7vh 4vw;
    }
    #project-view-title {
        font-size: 6vw;
    }
    .project-subtitle {
        font-size: 3.5vw;
    }
    .project-desc {
        font-size: 3.5vw;
    }
    .desc-img-caption { font-size: 2.5vw; }
    .project-section-title {
        font-size: 2.5vw;
    }
    .project-list li {
        font-size: 3vw;
    }
    .preuve-ref {
        font-size: 2.5vw;
        min-width: 14vw;
    }
    .preuve-intitule {
        font-size: 3vw;
    }
    .preuve-meta {
        font-size: 2.5vw;
    }
    .autoeval-key {
        font-size: 3vw;
    }
    .autoeval-val {
        font-size: 2.5vw;
    }
    #close-project {
        font-size: 4vw;
        padding: 2vh 8vw;
        left: 4vw;
    }
}

@media (max-width: 768px) {
    #project-view {
        bottom: 0;
        height: 100vh;
        padding-top: 10vh;
    }
}

#project-view-video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; margin-top: 1rem; }
#project-view-links a { text-decoration: underline; }
