:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-color: #414848;
    --text-color: #ffffff;
    --accent-color: #e74c3c;
    --card-background: #2d2d2d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ajouter au début de votre fichier competences.css ou dans un fichier global */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* viewport height */
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

main {
    flex: 1 0 auto; /* Cette propriété est cruciale - elle permet au contenu de s'étendre */
}

footer {
    flex-shrink: 0; /* Empêche le footer de rétrécir */
}
.projets-container {
    padding: 120px 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.projets-container h1 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

/* Grille des projets */
.projets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Carte de projet */
.projet-card {
    background-color: var(--card-background);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.projet-card:hover {
    transform: translateY(-5px);
}

.projet-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.projet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.projet-card:hover .projet-image img {
    transform: scale(1.1);
}

.projet-content {
    padding: 1.5rem;
}

.projet-content h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.projet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background-color: rgba(52, 152, 219, 0.2);
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

.projet-description {
    color: #cccccc;
    margin-bottom: 1.5rem;
}

.projet-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: center;
}

.projet-links a {
    color: var(--text-color) !important;
    text-decoration: none;
    font-size: 1rem;
}

.btn-details,
.btn-github,
.btn-demo,
.btn-pdf {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-details {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.btn-pdf {
    background-color: #27ae60;
    color: var(--text-color) !important;
    text-decoration: none !important;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    display: inline-block;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    transition: background 0.3s, opacity 0.3s;
    box-shadow: 0 2px 8px rgba(39,174,96,0.08);
    cursor: pointer;
}

.btn-pdf:hover {
    background-color: #219150;
    opacity: 0.85;
    text-decoration: none !important;
}

.btn-details:hover,
.btn-github:hover {
    opacity: 0.8;
}

/* Modal de détails du projet */
.projet-details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--background-color);
    margin: 50px auto;
    padding: 2rem;
    max-width: 800px;
    border-radius: 10px;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
}

.projet-details section {
    margin-bottom: 2rem;
}

.projet-details h2 {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.projet-details h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.projet-details ul {
    list-style-type: none;
    padding-left: 1rem;
}

.projet-details li {
    margin-bottom: 0.5rem;
    position: relative;
}

.projet-details li::before {
    content: "•";
    color: var(--secondary-color);
    position: absolute;
    left: -1rem;
}

.challenge {
    background-color: var(--card-background);
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.challenge h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* Timeline */
.timeline {
    background-color: var(--card-background);
    padding: 1rem;
    border-radius: 5px;
    min-height: 200px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .projets-container {
        padding: 100px 1rem 1rem;
    }

    .modal-content {
        margin: 20px;
        padding: 1rem;
    }

    .projet-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        width: 100%;
        text-align: center;
    }
}
/* Ensure modals and additional sections have dark background */
.modal-content, 
.veille-sujets, 
.veille-newsletter {
    background: linear-gradient(145deg, var(--card-background), var(--primary-color)) !important;
    color: var(--text-color);
}

/* Additional padding to ensure full coverage */
.veille-sujets, 
.veille-newsletter {
    padding-bottom: 4rem;
}
main {
    position: relative;
    z-index: 1;
}