/* ================= RESET GLOBAL ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ================= VARIABLES ================= */

:root {
    --main-color: #1F4E79;
    --main-hover: #163a5a;
    --cta-color: #ff7a00;
}

/* ================= BODY ================= */

body {
    font-family: 'Poppins', sans-serif;
    background: #f5f7fa;
}

/* ================= HERO ================= */

.hero-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 10px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    background: var(--main-color);
    color: white;

    padding: 8px 14px;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;

    margin-bottom: 12px;
}

.hero {
    border-radius: 18px;
    overflow: hidden;

    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.hero-img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* ================= SEARCH ================= */

.search-section {
    display: flex;
    justify-content: center;
    margin: 35px 0;
    padding: 0 10px;
}

.search-box {
    display: flex;
    align-items: center;

    width: 100%;
    max-width: 550px;

    background: white;

    border-radius: 50px;

    box-shadow: 0 6px 25px rgba(0,0,0,0.08);

    overflow: hidden;
}

.search-bar {
    flex: 1;

    padding: 15px 20px;

    border: none;
    outline: none;

    font-size: 16px;
    background: transparent;
}

.search-btn {
    background: var(--main-color);
    color: white;

    border: none;

    width: 60px;
    height: 55px;

    cursor: pointer;

    font-size: 18px;

    transition: 0.3s;
}

.search-btn:hover {
    background: var(--main-hover);
}

/* ================= INPUT FIX ================= */

input,
textarea,
select {
    font-size: 16px;
}

/* ================= PROJECTS ================= */

.projects {
    max-width: 1200px;
    margin: auto;
    padding: 20px 10px 80px;
}

.projects h2 {
    margin-bottom: 25px;

    color: #15803d;

    font-size: 30px;
    font-weight: 700;
}

/* ================= GRID ================= */

.project-list {
    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

    gap: 30px;
}

/* ================= CARD ================= */

.project-card {
    background: white;

    border-radius: 22px;

    overflow: hidden;

    border: 1px solid #e5e7eb;

    box-shadow: 0 10px 30px rgba(0,0,0,0.08);

    text-decoration: none;
    color: inherit;

    display: flex;
    flex-direction: column;

    position: relative;

    transition: 0.4s ease;

    opacity: 0;
    transform: translateY(60px) scale(0.95);
}

.project-card.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.project-card:hover {
    transform: translateY(-10px);

    box-shadow: 0 20px 45px rgba(0,0,0,0.15);
}

/* ================= IMAGE ================= */

.project-img-container {
    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #f1f1f1;
}

.project-img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.4s ease;
}

.project-card:hover .project-img {
    transform: scale(1.08);
}

/* ================= CONTENT ================= */

.project-content {
    padding: 22px;

    display: flex;
    flex-direction: column;

    flex: 1;
}

/* ================= BADGE ================= */

.project-badge {
    width: fit-content;

    background: #e8f5e9;
    color: #15803d;

    padding: 6px 12px;

    border-radius: 30px;

    font-size: 12px;
    font-weight: 600;

    margin-bottom: 15px;
}

/* ================= TITRE ================= */

.project-content h3 {
    font-size: 22px;
    font-weight: 700;

    color: var(--cta-color);

    margin-bottom: 12px;
}

/* ================= TEXTE ================= */

.project-content p {
    color: #6b7280;

    line-height: 1.6;

    font-size: 14px;

    flex-grow: 1;
}

/* ================= BOUTON ================= */

.fake-btn {
    margin-top: 20px;
    margin-left: auto;

    background: var(--main-color);
    color: white;

    padding: 12px 18px;

    border-radius: 12px;

    font-size: 14px;
    font-weight: 600;

    transition: 0.3s;
}

.project-card:hover .fake-btn {
    background: var(--main-hover);

    transform: translateY(-2px);
}

/* ================= SCROLL BUTTON ================= */

#scrollTopBtn {
    position: fixed;

    right: 20px;
    bottom: 20px;

    width: 50px;
    height: 50px;

    border: none;

    border-radius: 50%;

    background: var(--main-color);
    color: white;

    font-size: 18px;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;

    transition: 0.3s;

    z-index: 999;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {

    .projects h2 {
        font-size: 24px;
    }

    .project-list {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 550px) {

    .project-list {
        grid-template-columns: 1fr;
    }

    .search-btn {
        width: 55px;
    }

}