/* ============================================================
   STYLES.CSS — Homepage Only
   Hero section, background slideshow, subtitle, project grid,
   and project card overlay/description.
   ============================================================ */

/* --- HOMEPAGE OVERRIDES --- */
.mainlogo span {
    color: #fff;
    transition: color 0.3s;
}

.mainlogo.scrolled span {
    color: #000;
}

.langheader {
    color: #fff;
}

.top-page {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: #000;
}


/* --- BACKGROUND SLIDESHOW --- */
.bgd {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 1s ease-in-out;
    animation: kenburns 20s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes kenburns {
    from { transform: scale(1); }
    to   { transform: scale(1.2); }
}

.overlaybgd {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
}


/* --- SPACING BELOW HERO --- */
.page {
    padding-top: 25vh;
}


/* --- SUBTITLE --- */
.subtitle {
    font-weight: 100;
    height: auto;
    text-align: center;
    padding: 0 20px;
}

/* H1 : même style que le logo (40px, sans tracking) */
.subtitle h1 {
    font-size: 40px;
    letter-spacing: 0;
    text-align: center;
}

/* H2 "PROJETS" garde le tracking élégant */
.subtitle h2 {
    letter-spacing: 7px;
    text-align: center;
}

.proj {
    margin-top: 100px;
    margin-bottom: 50px;
}


/* --- PROJECT GRID --- */
.startgrid {
    --grid-gap: 0px;
    --grid-max-cols: 3;
    --grid-min-col: 300px;
    --col-calc: calc((100% - var(--grid-gap) * var(--grid-max-cols) - var(--grid-gap)) / var(--grid-max-cols));
    --col-min: max(var(--grid-min-col), var(--col-calc));

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--col-min), 1fr));
    grid-auto-rows: minmax(500px, 650px);
    gap: var(--grid-gap);
    flex: 1;
    width: 75%;
    margin: 0 auto 100px;
}


/* --- PROJECT CARD IMAGE --- */
.pimage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 11;
    width: 100%;
    height: 100%;
    transition: 0.5s;
}

.pimage img {
    width: 100%;
    height: 80%;
    object-fit: cover;
    display: block;
    z-index: 15;
}


/* --- HOVER OVERLAY --- */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 90%;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 16;
    pointer-events: none;
}

.pimage:hover .overlay {
    opacity: 1;
}


/* --- PROJECT DESCRIPTION --- */
.desc {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background-color: #fff;
    z-index: 21;
    opacity: 1;
    transition: 0.5s;
}

.pimage:hover .desc {
    opacity: 1;
}

.ptag {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #000;
}

.ptag span {
    color: #000;
    font-weight: 100;
    text-decoration: none;
}

.ptitle {
    color: #000;
    font-weight: 600;
    font-size: 20px;
}

/* Page de garde uniquement : titres en fin (la page projet garde le gras) */
.startgrid[data-mode="featured"] .ptitle {
    font-weight: 100;
}


/* --- RESPONSIVE --- */
@media (max-width: 1600px) {
    .startgrid {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .page { padding-top: 15vh; }

    .subtitle {
        letter-spacing: 3px;
    }
}

@media (max-width: 480px) {
    .startgrid {
        grid-auto-rows: minmax(300px, 450px);
    }

    .proj {
        margin-top: 50px;
        margin-bottom: 25px;
    }
}
