/* Styles spécifiques aux pages de détail des projets */

.projet-detail {
    padding: var(--section-padding);
    background-color: var(--light-color);
    position: relative;
    overflow: hidden;
}

.projet-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.projet-header {
    margin-bottom: 50px;
    text-align: center;
}

.projet-title {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.projet-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.projet-intro {
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.projet-section {
    margin-bottom: 60px;
}

.projet-section h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    position: relative;
}

.projet-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
}

.projet-section p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.competences-list {
    list-style-type: none;
    padding: 0;
}

.competences-list li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}

.competences-list li::before {
    content: '\f5fc';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.projet-conclusion {
    margin-top: 40px;
    padding: 30px;
    background-color: rgba(0, 119, 182, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.projet-carousel {
    margin: 40px auto;
    max-width: 800px;
}

.carousel-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.return-btn {
    display: inline-flex;
    align-items: center;
    margin-top: 30px;
}

.return-btn i {
    margin-right: 10px;
}

/* Lien GitHub */
.github-link {
    margin: 30px 0;
    text-align: center;
}

.btn-github {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background-color: #24292e;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    gap: 10px;
}

.btn-github:hover {
    background-color: #1b1f23;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(36, 41, 46, 0.3);
    color: white;
    text-decoration: none;
}

.btn-github i {
    font-size: 1.2rem;
}

/* Competence cards - Draggable Infinite Carousel */
.competence-cards.carousel-drag-wrapper {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    margin: 30px 0;
    gap: 25px;
    width: 100%;
    cursor: grab;
    scroll-behavior: auto; /* Required for JS dragging */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

/* Hide scrollbar for cleaner look */
.competence-cards.carousel-drag-wrapper::-webkit-scrollbar {
    display: none;
}
.competence-cards.carousel-drag-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.competence-cards.carousel-drag-wrapper.active-drag {
    cursor: grabbing;
}

.projet-detail .competence-item {
    background: var(--card-bg, #ffffff);
    padding: 30px 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 119, 182, 0.1);
    border-top: 5px solid var(--primary-color);
    font-size: 1.02rem;
    line-height: 1.7;
    position: relative;
    overflow: hidden;
    width: 320px; /* fixed width for carousel */
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none; /* Prevent text selection while dragging */
    color: var(--text-medium-gray, #555);
}

.projet-detail .competence-item:nth-child(5n+1) { border-top-color: var(--primary-color); }
.projet-detail .competence-item:nth-child(5n+2) { border-top-color: var(--secondary-color); }
.projet-detail .competence-item:nth-child(5n+3) { border-top-color: var(--heading-color); }
.projet-detail .competence-item:nth-child(5n+4) { border-top-color: var(--accent-color); }
.projet-detail .competence-item:nth-child(5n+5) { border-top-color: var(--primary-color); }

.projet-detail .competence-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 119, 182, 0.12);
    border-color: rgba(0, 119, 182, 0.3);
}

.projet-detail .competence-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at top right, rgba(0, 119, 182, 0.08), transparent 70%);
    border-radius: 50%;
    transition: transform 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.projet-detail .competence-item:hover::after {
    transform: scale(1.8);
}

.projet-detail .competence-item strong {
    color: var(--heading-color, var(--secondary-color));
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
}

.projet-detail .competence-item strong::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 12px;
    font-size: 1.4rem;
    color: inherit;
    opacity: 0.9;
}

/* Dark Mode Overrides for SAE Competence cards (defeats generic dark-mode.css overrides) */
body.dark-mode .projet-detail .competence-item {
    background: rgba(20, 20, 25, 0.65) !important;

    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: 5px solid var(--primary-color) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    color: #e0e0e0 !important;
}

body.dark-mode .projet-detail .competence-item:nth-child(5n+1) { border-top-color: var(--primary-color) !important; }
body.dark-mode .projet-detail .competence-item:nth-child(5n+2) { border-top-color: var(--secondary-color) !important; }
body.dark-mode .projet-detail .competence-item:nth-child(5n+3) { border-top-color: var(--heading-color) !important; }
body.dark-mode .projet-detail .competence-item:nth-child(5n+4) { border-top-color: var(--accent-color) !important; }
body.dark-mode .projet-detail .competence-item:nth-child(5n+5) { border-top-color: var(--primary-color) !important; }

body.dark-mode .projet-detail .competence-item strong {
    color: #ffffff !important;
    text-shadow: none !important;
}

body.dark-mode .projet-detail .competence-item:hover {
    border-color: rgba(144, 224, 239, 0.4) !important;
    box-shadow: 0 15px 35px rgba(0, 119, 182, 0.3) !important;
}

/* Durée et informations du projet */
.projet-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.95rem;
}

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

/* Sections spécialisées */
.objectifs-list,
.delivrables-list {
    list-style: none;
    padding: 0;
}

.objectifs-list li,
.delivrables-list li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
}

.objectifs-list li::before {
    content: '\f0da';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.delivrables-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--accent-color);
    position: absolute;
    left: 0;
}

/* Technologies et outils utilisés */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.tech-item {
    background-color: rgba(0, 119, 182, 0.1);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Media Queries pour la responsivité */
@media screen and (max-width: 768px) {
    .projet-title {
        font-size: 2.3rem;
    }

    .projet-subtitle {
        font-size: 1.3rem;
    }

    .projet-carousel {
        max-width: 95%;
    }

    .projet-meta {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .tech-stack {
        justify-content: center;
    }
}

@media screen and (max-width: 576px) {
    .projet-title {
        font-size: 2rem;
    }

    .projet-subtitle {
        font-size: 1.2rem;
    }

    .projet-section {
        margin-bottom: 40px;
    }
}

/* Animations au scroll (reveal asymetrique) */
.reveal-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal-active {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* Modal Competences */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-content {
    background: var(--card-bg, #ffffff);
    width: 90%;
    max-width: 600px;
    border-radius: 24px;
    padding: 40px;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    border-top: 6px solid var(--primary-color);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.5rem;
    color: var(--text-light-gray, #999);
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    opacity: 0.9;
}

.modal-content h3 {
    font-size: 1.8rem;
    color: var(--heading-color);
    margin-bottom: 10px;
}

.modal-subtitle {
    font-size: 1.1rem;
    color: var(--text-medium-gray, #555);
    margin-bottom: 25px;
    line-height: 1.6;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.modal-body h4 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body p {
    color: var(--text-color);
    line-height: 1.7;
    font-size: 1.05rem;
}

body.dark-mode .modal-content {
    background: #1a1a20;
    border: 1px solid rgba(255,255,255,0.1);
    border-top: 6px solid var(--primary-color);
}

body.dark-mode .modal-subtitle {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #bbb;
}
