/* ========================================
   Styles communs pour toutes les pages projets
   ======================================== */

/* Hero Section Projet */
.project-hero {
    min-height: 50vh;
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--darker-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
    margin-top: 60px; /* Compense la hauteur de la navbar */
}

.project-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

.project-hero .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.project-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
}

.back-button:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateX(-5px);
}

.back-button i {
    font-size: 1rem;
}

.project-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-description {
    font-size: 1.2rem;
    color: var(--gray-light);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.project-meta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.project-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-light);
}

.project-meta-item i {
    color: var(--primary-color);
}

.project-tags {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.project-tag {
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Bouton de lien du projet (GitHub, site web, etc.) */
.project-link-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    margin-top: 2rem;
    background: var(--gradient-accent);
    color: var(--light-color);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.project-link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.project-link-button i {
    font-size: 1.1rem;
}

/* Contenu Projet */
.project-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.project-section {
    margin-bottom: 4rem;
}

.project-section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.project-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-accent);
}

.project-section h2 i {
    margin-right: 0.75rem;
}

.project-section h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.project-section p {
    color: var(--gray-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.project-section ul {
    color: var(--gray-light);
    line-height: 1.8;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.project-section ul li {
    margin-bottom: 0.5rem;
}

.project-section ul li::marker {
    color: var(--primary-color);
}

.project-section ol {
    color: var(--gray-light);
    line-height: 1.8;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.project-section ol li {
    margin-bottom: 0.5rem;
}

/* Challenge Cards */
.challenge-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition-base);
}

.challenge-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateX(5px);
}

.challenge-card h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.challenge-card h4 i {
    font-size: 1.5rem;
}

.challenge-card p {
    color: var(--gray-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.challenge-card ul {
    color: var(--gray-light);
    line-height: 1.8;
    padding-left: 2rem;
}

.challenge-card ul li {
    margin-bottom: 0.5rem;
}

/* Tech Stack Grid */
.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tech-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-base);
}

.tech-item:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-5px);
}

.tech-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.tech-item h4 {
    color: var(--light-color);
    margin-bottom: 0.5rem;
}

.tech-item p {
    color: var(--gray-light);
    font-size: 0.9rem;
}

/* Back Button */
/* Déjà défini dans la section Hero - styles fusionnés ci-dessus */

/* Image container and caption */
.project-image-container {
    margin: 2.5rem auto; /* Centered */
    max-width: 700px; /* Reduced max-width for the container */
    background: rgba(30, 41, 59, 0.3); /* A single card background */
    border-radius: 12px; /* Rounded corners for the card */
    overflow: hidden; /* To keep image corners rounded */
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 35px rgba(2, 6, 23, 0.6);
}

.project-image-container img {
    max-width: 100%;
    height: auto;
    display: block;
    /* No border-radius here, will be handled by the container */
}

.image-caption {
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    color: var(--gray-light);
    font-style: italic;
    text-align: center;
    background: rgba(30, 41, 59, 0.5); /* Slightly different background for caption area */
}

/* Responsive */
@media (max-width: 768px) {
    .project-hero {
        padding: 4rem 1rem 3rem;
        min-height: 40vh;
    }

    .project-hero .container {
        padding: 0 1rem;
    }

    .project-hero h1 {
        font-size: 2rem;
    }

    .project-description {
        font-size: 1rem;
    }

    .project-meta {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }

    .back-button {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .project-content {
        padding: 2rem 1rem;
    }

    .tech-stack {
        grid-template-columns: 1fr;
    }

    .challenge-card {
        padding: 1.5rem;
    }

    .project-link-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .project-link-button i {
        font-size: 1rem;
    }
}
