/* ================= 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;
}


/* INTRO */
.intro-books {
    text-align: center;
    padding: 50px 15px 20px;
}

.intro-content {
    max-width: 500px;
    margin: auto;
}

.intro-content h1 {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.3;
    color: #15803d;
}

.intro-text {
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 14px;
}

/* ================= SEARCH ================= */
.search-section {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.search-box {
    display: flex;
    align-items: center;
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.search-bar {
    flex: 1;
    padding: 14px 18px;
    border: none;
    outline: none;
    font-size: 16px;
}

.search-btn {
    background: var(--main-color);
    color: white;
    border: none;
    padding: 14px 18px;
    cursor: pointer;
}

/* ================= INPUT FIX ================= */
input, textarea, select {
    font-size: 16px;
}

/* ================= PROJECTS ================= */
.projects {
    max-width: 1200px;
    margin: auto;
    padding: 20px 10px 60px;
    
}

.projects h2 {
    margin-bottom: 20px;
    color: #15803d;
}

/* GRID */
.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

/* ================= CARD ================= */
.project-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);

    display: flex;
    flex-direction: column;

    cursor: pointer;
    text-decoration: none;
    color: inherit;

    position: relative;

    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: all 0.4s ease;
}

.project-card.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* HOVER */
.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 45px rgba(0,0,0,0.15);
}

/* CLICK EFFECT */
.project-card:active {
    transform: scale(0.97);
}

/* ARROW */
.project-card::after {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 18px;
    color: var(--cta-color);
    opacity: 0;
    transition: 0.3s;
}

.project-card:hover::after {
    opacity: 1;
}

/* IMAGE */
.project-img-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 1px solid #eee;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

/* ================= CONTENT ================= */
.project-content {
    padding: 20px;

    /* 🔥 AJOUT POUR POSITIONNER LE BOUTON */
    display: flex;
    flex-direction: column;
}

/* TITRE */
.project-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--cta-color);
    margin-bottom: 10px;
}

/* TEXTE */
.project-content p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;

    /* 🔥 pousse le bouton en bas */
    flex-grow: 1;
}

/* ================= BOUTON VISUEL ================= */
.fake-btn {
    margin-top: 15px;
    margin-left: auto; /* 🔥 à droite */
    display: block;

    background: var(--main-color);
    color: white;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    transition: 0.3s;
}

/* hover bouton */
.project-card:hover .fake-btn {
    background: var(--main-hover);
    transform: translateY(-2px);
}

/* ================= SCROLL BUTTON ================= */
#scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--main-color);
    color: white;
    border-radius: 50%;
    opacity: 0;
    transition: 0.3s;
}

#scrollTopBtn.show {
    opacity: 1;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .project-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .project-list {
        grid-template-columns: 1fr;
    }
}