/* Fichier style.css */

/* --- Styles Généraux --- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: white;
    margin: 0;
    background-color: #111827;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* --- Fond Animé --- */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
}

/* --- En-tête --- */
.main-header {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    position: relative; /* MODIFIÉ : Nécessaire pour positionner le canvas à l'intérieur */
    overflow: hidden;   /* MODIFIÉ : Empêche le canvas de déborder */
}

/* AJOUT : Style pour le canvas des particules */
#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Se place entre le fond et le contenu */
}

.header-content {
    position: relative; /* MODIFIÉ : Pour s'assurer qu'il est au-dessus du canvas */
    z-index: 2;         /* MODIFIÉ : Met le contenu au premier plan */
}

.header-content h1 {
    font-weight: 700;
    font-size: 3rem;
    line-height: 1;
}

.header-content p {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    line-height: 1.75rem;
}

@media (min-width: 768px) {
    .header-content h1 { font-size: 4.5rem; }
    .header-content p { font-size: 1.25rem; }
}

@media (min-width: 1024px) {
    .header-content h1 { font-size: 6rem; }
}

/* --- Section Projets --- */
.projects-section {
    background-color: #1a202c;
    color: #F9FAFB;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.projects-section h2 {
    font-size: 2.25rem;
    line-height: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

/* --- Cartes de Projet (Style Verre Liquide) --- */
.project-card {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem; 
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

.project-image {
    width: 100%;
    height: 14rem;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}

.project-title {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #FFFFFF; 
}

.project-description {
    color: #E2E8F0; 
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* Style de base pour TOUS les boutons */
.project-button {
    background-color: #3B82F6; 
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.project-button:hover {
    background-color: #2563EB;
}

.project-button-notfinished {
    background-color: #9e0a0a; 
}

.project-button-notfinished:hover {
    background-color: #7f1d1d; 
}


@keyframes tremblement {
    0% { transform: translateX(0); }
    10% { transform: translateX(-10px); }
    20% { transform: translateX(10px); }
    30% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    50% { transform: translateX(-10px); }
    60% { transform: translateX(10px); }
    70% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
    90% { transform: translateX(-10px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: tremblement 0.5s;
}

.project-source-link {
    color: #E2E8F0; 
}
.project-source-link:hover {
    color: #FFFFFF;
}
.project-source-link svg {
    width: 2rem;
    height: 2rem;
}

/* --- Section Compétences --- */
.competences-section {
    background-color: #111827;
    color: #F9FAFB;
    padding: 5rem 0;
    text-align: center;
}

.competences-section h2 {
    font-size: 2.25rem;
    line-height: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

.competences-grid {
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .competences-grid {
        gap: 2rem;
    }
}

/* --- Cartes de Compétences (Style Verre Liquide) --- */
.skill-card {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 1rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    flex-basis: calc(50% - 1.5rem);
    max-width: 200px;
}

@media (min-width: 640px) {
    .skill-card {
        flex-basis: calc(33.333% - 1.5rem);
    }
}

@media (min-width: 1024px) {
    .skill-card {
       flex-basis: calc(25% - 2rem);
    }
}


.skill-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.skill-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
}

.skill-icon img, .skill-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.skill-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #F9FAFB;
}

/* --- Section Formation --- */
.formation-section {
    background-color: #0c121e;
    color: #F9FAFB;
    padding: 5rem 0;
    text-align: center;
}

.formation-section h2 {
    font-size: 2.25rem;
    line-height: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

.formation-item {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.formation-item h3 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.formation-item .formation-details {
    color: #9CA3AF;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.formation-item .formation-description {
    color: #D1D5DB;
    line-height: 1.75;
    text-align: left;
}


/* --- Boutons de Navigation --- */
.nav-button {
    position: fixed;
    right: 1.25rem;
    background-color: rgba(31, 41, 55, 0.4);
    color: #FFFFFF;
    padding: 0.75rem;
    border-radius: 9999px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    z-index: 50;
    transition: all 0.15s ease-in-out;
}

.nav-button:hover {
    background-color: rgba(31, 41, 55, 0.6);
    transform: scale(1.1);
}

.nav-button svg {
    width: 1.5rem;
    height: 1.5rem;
    display: block;
}

#prev-section-btn {
    bottom: 5.5rem;
}

#next-section-btn {
    bottom: 1.5rem;
}

/* Classe utilitaire pour cacher des éléments avec JS */
.hidden {
    display: none;
}
