/* Projects */
section.projects,
section.templates {
    width: 100%;
    margin: 0;
    padding-top: 96px;
    padding-bottom: 72px;

    color: #333;
    background: #f0f0f0;

    text-align: center;
}
section.projects > h2,
section.templates > h2 {
    margin: 0;
    padding: 0;

    font-size: 2.1em;
    text-transform: uppercase;
    font-weight: normal;
}
section.projects > p,
section.templates > p {
    color: #5e5e5e;
    margin-top: 24px;
    margin-bottom: 72px;
}

.grid {
    display: grid;

    width: min-content;

    grid-template-columns: repeat(3, 1fr);
    margin: 0 auto;
}

section.projects {
    background: #dfdfdf;
}



/* Project Items Animations */
.effect {
    position: absolute;

    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;

    background-color: rgba(0, 0, 0, 0.2);
    -webkit-transition: background-color .5s ease;
            transition: background-color .5s ease;
}
.effect:hover {
    background-color: rgba(0, 0, 0, 0.6);
}


.effect > h2 {
    margin: 90px 0 0 0;
    padding: 0;

    opacity: .8;
    font-size: 1.2em;
    font-weight: normal;
    text-transform: uppercase;
    text-shadow: #000 0 0 10px;
    -webkit-transition: margin-top .5s ease, opacity .5s ease;
            transition: margin-top .5s ease, opacity .5s ease;
}
.effect:hover > h2 {
    opacity: 1;
    margin-top: 106px;
}

.effect > p {
    position: absolute;

    bottom: 0;
    width: 100%;

    opacity: 0;
    font-size: .75em;
    -webkit-transition: bottom .5s ease, opacity .5s ease;
            transition: bottom .5s ease, opacity .5s ease;
}
.effect:hover > p {
    bottom: 24px;
    opacity: 1;
}



.project-item {
    position: relative;
    display: flex;
    align-items: center;

    margin: 24px;

    color: #fff;
    cursor: pointer;
}
.project-item > img {
    width: 361px;
    height: 241px;
}
.project-item::before, .project-item::after {
    content: '';
    position: absolute;
    background: transparent;
    pointer-events: none;
    z-index: 1;
}
.project-item::before {
    width: 0;
    height: 80%;
    top: 10%;
    left: 50%;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
    -webkit-transition: left .5s ease, width .5s ease;
            transition: left .5s ease, width .5s ease;
}
.project-item:hover::before {
    left: 10%;
    width: 80.5%;
}
.project-item::after {
    width: 80%;
    height: 0;
    top: 50%;
    left: 10%;
    border-left: 1px solid #fff;
    border-right: 1px solid #fff;
    -webkit-transition: top .5s ease, height .5s ease;
            transition: top .5s ease, height .5s ease;
}
.project-item:hover::after {
    top: 10%;
    height: 80.5%;
}

/* Bouton "Show more" */
.show-more-container {
    text-align: center;
    margin-top: 48px;
}

.show-more-btn {
    background: #333;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 1.1em;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.show-more-btn:hover {
    background: #555;
}

.show-more-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.3);
}

/* Animation pour les projets cachés */
.hidden-projects {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.5s ease, max-height 0.5s ease;
}

.hidden-projects.show {
    opacity: 1;
    max-height: 2000px;
}
