/* --- VARIABLES & BASE (MOBILE FIRST) --- */
:root {
    --banner-height-mobile: 220px;
    --banner-height-desktop: 300px;
    --glass-bg: rgba(25, 27, 31, 0.9);
    --glass-border: rgba(0, 188, 212, 0.2);
}

.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 1100px;
    padding: 20px;
    margin: 0 auto;
    /* Centré */
}

.project-card {
    display: flex;
    flex-direction: column;
    /* MOBILE FIRST : Vertical */
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
    width: 100%;
}

/* --- ZONE PREVIEW --- */
.project-preview {
    width: 100%;
    height: var(--banner-height-mobile);
    background: #000;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
}

.preview-browser-bar {
    height: 20px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 4px;
}

.browser-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    opacity: 0.5;
}

.dot-red {
    background: #ff5f56;
}

.dot-yellow {
    background: #ffbd2e;
}

.dot-green {
    background: #27c93f;
}

.preview-iframe-container {
    width: 100%;
    height: calc(100% - 20px);
    pointer-events: none;
}

.preview-iframe {
    width: 100vw;
    /* Prend toute la largeur sur mobile */
    height: 100vh;
    border: none;
    transform: scale(0.4);
    /* Miniature sur mobile */
    transform-origin: 0 0;
}

/* --- ZONE INFO --- */
.project-info {
    padding: 20px;
    text-align: center;
    /* Ajouté pour centrage */
    display: flex;
    /* Ajouté pour centrage */
    flex-direction: column;
    /* Ajouté pour centrage */
    align-items: center;
    /* Ajouté pour centrage */
}

.project-title {
    color: var(--color-accent-blue);
    font-size: 1.2rem;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.project-description {
    font-size: 0.85rem;
    color: rgba(240, 240, 240, 0.6);
    line-height: 1.5;
    margin-bottom: 15px;
}

.project-status {
    font-size: 0.75rem;
    color: var(--color-accent-blue);
    font-weight: 700;
}

/* Badge */
.project-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.6rem;
    padding: 3px 8px;
    border: 1px solid var(--color-accent-blue);
    background: rgba(0, 0, 0, 0.5);
    color: var(--color-accent-blue);
    border-radius: 4px;
    z-index: 5;
}

/* Base style for section title (also used in lab) */
.section-title {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 991px) {
    .section-title::before {
        content: "";
        flex: 1;
        height: 1px;
        background: linear-gradient(to left, var(--color-accent-blue), transparent);
        margin-right: 15px;
    }
}

/* --- DESKTOP ENHANCEMENTS (MIN-WIDTH) --- */
@media (min-width: 992px) {
    .projects-grid {
        max-width: 1100px;
        gap: 50px;
        padding: 40px 20px;
    }

    .project-card {
        flex-direction: row;
        /* Repasse en horizontal */
        height: var(--banner-height-desktop);
    }

    .project-card:hover {
        transform: translateY(-5px);
        border-color: var(--color-accent-blue);
    }

    .project-preview {
        flex: 0 0 60%;
        height: 100%;
        border-bottom: none;
        border-right: 1px solid var(--glass-border);
    }

    .project-info {
        flex: 1;
        padding: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: left;
        /* Reset pour Desktop */
        align-items: flex-start;
        /* Reset pour Desktop */
    }

    .project-title {
        font-size: 1.8rem;
    }

    .project-description {
        font-size: 0.95rem;
    }

    .preview-iframe {
        width: 1280px;
        height: 800px;
        transform: scale(0.5);
        /* Ratio adapté sur PC */
    }
}