/* Style pour les onglets */
.tabs {
    overflow: hidden; 
    background-color: transparent; 
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
}

.tablink {
    background-color: transparent; 
    background: radial-gradient(circle, #AE8625, #F7EF8A, #D2AC47, #EDC967); 
    -webkit-background-clip: text; 
    background-clip: text; /* Pour la compatibilité avec les navigateurs standards */
    -webkit-text-fill-color: transparent; 
    color: transparent; /* Pour la compatibilité avec les navigateurs standards */
    padding: 14px 16px; 
    cursor: pointer; 
    float: left; 
    border: none;
    outline: none;
    font-size: 17px;
    flex-grow: 1;
    text-align: center;
}

/* Style pour le contenu des onglets */
.container {
    display: flex; 
    flex-wrap: wrap;
    gap: 20px; 
    margin-bottom: 10vh;
    justify-content: center;
    width: 100%;
}

.vignette {
    width: calc(50% - 20px);
    max-width: 200px;
    border: 1px solid #ccc; 
    padding: 10px; 
    border-radius: 5px;
    text-align: center; 
    cursor: pointer;
    box-sizing: border-box;
}

.vignette img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    width: 90%;
    height: 90%;
    transform: translate(-50%, -50%);
    background-color: #333;
    color: white;
    padding: 20px;
    box-sizing: border-box;
    border: 2px solid #ccc;
    z-index: 1002;
    border-radius: 10px;
    overflow-y: auto;
}

.popup .close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 1004;
}

.popup .close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 1001;
}

.docuProjet {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    align-items: start;
    width: 100%;
    margin-top: 10px;
}

.imageProjet {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1001;
}

.imageProjet.expanded { 
    width: 90%; 
    max-width: 90vw;
    height: auto; 
    max-height: 80vh; 
    position: fixed; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    z-index: 1003;
    object-fit: contain;
} 

.categorie{
    background-color: transparent; 
    background: radial-gradient(circle, #AE8625, #F7EF8A, #D2AC47, #EDC967); 
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.project-goal{
    text-align: left; 
    line-height: 1.6;
}

.iconProj { 
    display: inline-block; 
    vertical-align: middle; 
    text-align: left; 
} 

.iconProj img { 
    width: 25px; 
    height: auto; 
    vertical-align: left; 
    margin-left: 10px; 
}

figcaption{
    text-align: center;
    font-size: 12px;
    padding: 5px;
    color: #ccc;
}

.popup-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    height: 100%;
}

.popup-main {
    padding-right: 0;
}

.popup-sidebar {
    border-left: none;
    border-top: 1px solid #555;
    padding-left: 0;
    padding-top: 20px;
}

.project-section {
    margin-bottom: 30px;
}

.project-section h3 {
    color: #EDC967;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    padding: 10px 0;
}

.tool-tag {
    background: rgba(174, 134, 37, 0.2);
    border: 1px solid #AE8625;
    border-radius: 15px;
    padding: 6px 12px;
    font-size: 0.9em;
    text-align: center;
    min-width: auto;
}

.doc-list {
    list-style: none;
    padding: 0;
}

.doc-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background 0.3s;
}

.doc-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.doc-item a {
    text-decoration: none;
    background: radial-gradient(circle, #AE8625, #F7EF8A, #D2AC47, #EDC967);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-left: 10px;
    word-break: break-word;
}

.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid #AE8625;
}

.timeline-item {
    margin-bottom: 20px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #EDC967;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.feature-item {
    background: linear-gradient(145deg, rgba(174, 134, 37, 0.1), rgba(237, 201, 103, 0.1));
    border: 1px solid rgba(174, 134, 37, 0.3);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    background: linear-gradient(145deg, rgba(174, 134, 37, 0.2), rgba(237, 201, 103, 0.2));
}

figure {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

video {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background-color: #000;
}


video::-webkit-media-controls {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0 0 8px 8px;
}


video:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}


/* Media Queries pour la responsivité */
@media screen and (min-width: 768px) {
    .popup-content {
        grid-template-columns: 2fr 1fr;
    }
    
    .popup-main {
        padding-right: 20px;
    }
    
    .popup-sidebar {
        border-left: 1px solid #555;
        border-top: none;
        padding-left: 20px;
        padding-top: 0;
    }
    
    .vignette {
        width: calc(33.333% - 20px);
    }
    
    .docuProjet {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media screen and (min-width: 1024px) {
    .vignette {
        width: calc(25% - 20px);
    }
    
    .popup {
        width: 80%;
    }
    
    .docuProjet {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media screen and (max-width: 480px) {
    .tablink {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .vignette {
        width: 100%;
        max-width: none;
    }
    
    .popup {
        padding: 15px;
        width: 95%;
        height: 95%;
    }
    
    .popup .close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
    
    .tools-list {
        gap: 5px;
    }
    
    .tool-tag {
        padding: 5px 10px;
        font-size: 0.8em;
    }
    
    .project-section h3 {
        font-size: 1.1em;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .imageProjet {
        height: 120px;
    }

    video {
        max-width: 100%;
        margin: 10px 0;
    }
}

/* Fix pour Safari et autres navigateurs */
@supports (-webkit-touch-callout: none) {
    .categorie, .tablink, .doc-item a {
        background-clip: text;
        color: transparent;
    }
}