/* Styles pour les pages de projets individuels */

/* Section Hero du projet */
.project-hero {
    height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: black;
    position: relative;
}

/* Contenu principal du projet */
.project-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* Sections du projet */
.project-section {
    margin-bottom: 3rem;
}

.project-section h2 {
    position: relative;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Informations du projet */
.project-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.project-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-info-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Stack technologique */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tech-item {
    background-color: var(--light-color);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Galerie d'images */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Indicateur de zoom sur les images */
.gallery-item::before {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.gallery-item:hover::before {
    opacity: 1;
}

/* Liens du projet */
.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Styles pour l'overlay d'image (Lightbox) */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.image-overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-image {
    max-width: 90%;
    max-height: 90%;
    border: 2px solid white;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
    transform: scale(0.85);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.8;
}

.image-overlay.active .overlay-image {
    transform: scale(1);
    opacity: 1;
}

/* Bouton de fermeture de l'overlay */
.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

/* Boutons de navigation pour l'overlay */
.nav-btn {
    position: absolute;
    top: 50%;
    font-size: 50px;
    color: white;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translateY(-50%);
    transition: all 0.3s;
    opacity: 0.7;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--primary-color);
    opacity: 1;
}

/* Compteur d'images pour le lightbox */
.image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Styles pour la mention "bientôt disponible" */
.coming-soon {
    color: var(--secondary-color);
    font-style: italic;
    background-color: rgba(108, 117, 125, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

/* Styles pour les boutons désactivés */
.btn-disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #f1f1f1 !important;
    color: var(--secondary-color) !important;
    border: 1px dashed var(--border-color) !important;
}

.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Styles pour la section de fonction d'évaluation */
.evaluation-criteria {
    margin: 2rem 0;
}

.criterion {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.criterion:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.criterion h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.criterion h4 i {
    font-size: 1rem;
}

.criterion p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.formula {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.8rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 1rem;
    color: var(--text-color);
}

.global-formula {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.game-phases {
    margin: 2rem 0;
}

.phase {
    background: var(--card-bg);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 8px 8px 0;
}

.phase h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.phase ul {
    list-style: none;
    padding: 0;
}

.phase li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    padding-left: 1.5rem;
}

.phase li:last-child {
    border-bottom: none;
}

.phase li:before {
    content: "▸";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.strategy-summary {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1), rgba(67, 160, 71, 0.1));
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.strategy-summary h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.strategy-summary p {
    line-height: 1.7;
    margin: 0;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .project-info {
        grid-template-columns: 1fr;
    }
    
    .project-hero {
        height: 40vh;
    }
    
    .project-content {
        padding: 2rem 1rem;
    }
    
    .project-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .project-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .project-links .btn {
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .project-hero h1 {
        font-size: 1.8rem;
    }
    
    .project-hero p {
        font-size: 1rem;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 35px;
    }
    
    .close-btn {
        font-size: 30px;
        top: 15px;
        right: 20px;
    }
}
