/* RESET */
body {
    margin: 0;
    font-family: Arial, sans-serif;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HERO */
.hero {
   background: #F0EAD6;
}

/* HEADER FIXE */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

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

    padding: 15px 30px;
    box-sizing: border-box;

    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

/* LOGO */
.logo {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #fff;
}

/* NAV */
.nav-left {
    display: flex;
    gap: 10px;
}

.nav-left a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,0.4);
}

.nav-left a:hover {
    background: rgba(0,0,0,0.8);
}

.nav-admin {
    display: flex;
    gap: 10px;
}

.nav-admin a {
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,0.4);
}

.nav-admin a:hover {
    background: rgba(0,0,0,0.8);
}


.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-btn {
    background: #fff;
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.user {
    color: #fff;
    font-size: 14px;
}

/* ===== GRID ===== */

.layers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;

    max-width: 1100px;
    margin: 0 auto;

    padding: 120px 30px 40px;
}

/* CARD */
.layer {
    position: relative; /* IMPORTANT FIX */

    height: 165px;

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

    color: #fff;
    text-decoration: none;

    border-radius: 12px;
    overflow: hidden;

    background-color: #222;

    background-size: cover;
    background-position: center;

    transition: all 0.25s ease;
}

/* OVERLAY UNIQUEMENT SI IMAGE */
.layer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
}

.layer.has-img::before {
    background: rgba(0,0,0,0.2);
}

/* CONTENT AU-DESSUS */
.layer-content {
    position: relative;
    z-index: 2;
    padding: 15px;
}

/* HOVER */
.layer:hover {
    transform: translateY(-4px);
}

/* TITRE */
.layer h2 {
    margin: 0;
    font-size: 24px;
}

/* TEXTE */
.last-article {
    margin-top: 6px;
    font-size: 16px;
    font-weight: 500;
    color: #ddd;
}

.empty {
    color: #aaa;
    font-size: 13px;
}

/* LIENS */
.layer-content a {
    color: #fff;
    text-decoration: underline;
}

.layer-content a:hover {
    color: #ffcc00;
}

/* ===== GENERIC ===== */

.category {
    max-width: 900px;
    margin: 80px auto;
    padding: 20px;
}

.card {
    margin-bottom: 20px;
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.type {
    font-size: 12px;
    color: #999;
}

/* CTA */
.cta-home {
    background: #ffcc00;
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
}

.cta-home:hover {
    background: #ffd633;
}

/* SCROLL */
html {
    scroll-behavior: smooth;
}

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

/* TABLETTE */
@media (max-width: 900px) {

    .layers {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 120px 20px 30px;
    }

    .layer {
        height: 140px;
    }

}


/* MOBILE */
@media (max-width: 600px) {

    .layers {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 110px 15px 25px;
    }

    .layer {
        height: 120px;
    }

    .layer h2 {
        font-size: 18px;
    }

    .last-article {
        font-size: 14px;
    }

}