body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    background-color: #0d0f14; /* Fond global sombre très pro */
    color: white;
    overflow-x: hidden;
}

/* --- EFFET PARALLAXE DE FOND --- */
.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120vh;
    background: radial-gradient(circle at 20% 30%, rgba(26, 32, 53, 0.6) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(13, 27, 42, 0.7) 0%, transparent 50%);
    z-index: -1;
    transform: translateZ(0);
}

.header-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(13, 15, 20, 0.4), #0d0f14), 
                url('../images/wallpaper.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed; /* Parallaxe natif sur l'image de fond */
}

.header-content {
    text-align: center;
    color: white;
    z-index: 2;
    padding: 0 20px;
}

.header-content h1 {
    font-size: 3.5em;
    margin-bottom: 0.3em;
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.header-content p {
    font-size: 1.4em;
    margin-bottom: 2em;
    color: #cbd5e1;
}

/* --- BOUTONS COMPLETEMENT RETRAVAILLÉS --- */
.buttons {
    display: flex;
    gap: 1em;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 0.8em 2em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.btn.blue {
    background-color: #2563eb;
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn.blue:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn.gray {
    background-color: #334155;
    color: white;
}

.btn.gray:hover {
    background-color: #475569;
    transform: translateY(-2px);
}

/* --- RECHERCHE --- */
.search-container {
    display: flex;
    justify-content: center;
    margin: 40px 0 20px 0;
}

#search-bar {
    width: 40%;
    min-width: 280px;
    padding: 14px 20px;
    border: 1px solid #334155;
    border-radius: 25px;
    box-sizing: border-box;
    text-align: center;
    background-color: #1e293b;
    color: white;
    font-size: 1em;
    transition: all 0.3s ease;
}

#search-bar:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    width: 45%;
}

/* --- ENSEMBLE DES PROJETS --- */
.projects {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- CARTES PROJETS (UPGRADÉES AVEC LES RECOMMANDATIONS) --- */
.project {
    width: calc(33.333% - 20px);
    text-align: center;
    border: 1px solid #2d3748;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    background-color: rgba(30, 41, 59, 0.7); /* Translucide pour voir subtilement le fond */
    backdrop-filter: blur(8px); /* Flou de fond pour la lisibilité */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 45px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                border-color 0.3s ease;
}

/* Effet de survol sur la carte entière */
.project:hover {
    transform: translateY(-6px);
    border-color: #4b5563;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

/* Lien global englobant Image + Titre */
.project-link-wrapper {
    text-decoration: none;
    color: white;
    display: block;
    width: 100%;
}

.project img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background-color: rgba(15, 23, 42, 0.5);
    padding: 6px;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: opacity 0.3s ease;
}

.project:hover img {
    opacity: 0.9;
}

.project h2 {
    font-size: 1.4em;
    margin: 10px 0;
    color: white;
    transition: color 0.2s ease;
}

.project-link-wrapper:hover h2 {
    color: #3b82f6; /* Éclairage bleu au survol du titre/image */
}

.project p {
    margin: 10px 0;
    font-size: 0.95em;
    color: #94a3b8;
    line-height: 1.5;
    flex-grow: 1; /* Pousse le footer du projet vers le bas pour l'alignement */
}

/* --- SYSTEME DE TAGS RECOMMANDÉ --- */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 12px 0;
}

.tech-tag {
    font-size: 0.75em;
    background-color: #0f172a;
    color: #93c5fd;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #1e3a8a;
}

/* Aligne la date et le bouton source proprement en bas */
.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #334155;
}

.project .date {
    font-size: 0.85em;
    color: #64748b;
    margin: 0;
}

/* Liens du footer de la carte */
.github-icon-link {
    font-size: 0.85em;
    color: #3b82f6 !important;
    text-decoration: none;
    font-weight: bold;
}

.github-icon-link:hover {
    text-decoration: underline;
    color: #60a5fa !important;
}

/* --- BADGES DE STATUT --- */
.status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.75em;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.completed {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* --- FOOTER ET MENTION UMAMI --- */
footer {
    background-color: #090b0f;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #1e293b;
    margin-top: 60px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content p {
    margin: 8px 0;
    color: #94a3b8;
    font-size: 0.95em;
}

.footer-content .notice {
    font-style: italic;
    color: #f59e0b;
    font-size: 0.9em;
    margin-bottom: 12px;
}

.footer-content .privacy-note {
    font-size: 0.85em;
    color: #64748b;
    border-left: 2px solid #3b82f6;
    padding-left: 10px;
    display: inline-block;
    margin-bottom: 16px;
    text-align: left;
    max-width: 600px;
}

.footer-buttons {
    margin-top: 20px;
}

/* --- BOUTON RETOUR EN BAS --- */
.scroll-down {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(37, 99, 235, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);

    z-index: 99999 !important;
    transform: translateZ(0);
}

.scroll-down::before {
    content: "↓";
    display: inline-block;
    line-height: 1;
}

.scroll-down.up::before {
    content: "↑";
}

.scroll-down:hover {
    background-color: #2563eb;
    transform: translateY(-2px) translateZ(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 1200px) {
    .project {
        width: calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    .project {
        width: 100%;
    }
    .header-content h1 {
        font-size: 2.5em;
    }
    #search-bar {
        width: 80%;
    }
}