
/* Documents css */


.doc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.doc-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .doc-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

.doc-card {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.doc-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    border-color: currentColor;
}

.doc-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.doc-flag {
    font-size: 1.1rem;
}

.doc-title {
    font-size: 0.98rem;
}

.doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid currentColor;
    font-size: 0.85rem;
    text-decoration: none;
    color: inherit;
    background: transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.doc-btn-secondary {
    opacity: 0.85;
}

.doc-btn:hover {
    background: currentColor;
    color: #fff;
}

.doc-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
}

.doc-icon svg {
    width: 100%;
    height: 100%;
}


@media (max-width: 600px) {

    /* Project cards (Nos Projets page) */
    .project-card {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px !important;
        padding: 16px !important;
        font-size: 1.05rem !important;
    }

    /* Document cards (Documents page) */
    .doc-card {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 18px !important;
        padding: 16px !important;
        font-size: 1.05rem !important;
    }

    /* Optional: make the PDF button bigger too */
    .pdf-button,
    .doc-btn {
        padding: 10px 16px !important;
        font-size: 1rem !important;
    }
}




/* Layout */
.projects-layout {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

/* Timeline */
.timeline-nav {
    width: 160px;
    position: sticky;
    top: 100px;
    border-left: 3px solid #e0e0e0;
    padding-left: 12px;
}

.timeline-year-link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 0 12px 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all .2s ease;
}

.timeline-year-link.active {
    border-left: 4px solid #2a7ae2;
    margin-left: -4px;
    padding-left: 14px;
    color: #2a7ae2;
}

/* Year block */
/* .year-block {
     margin-bottom: 180px; 
} */

.year-title {
    font-size: 32px;
    font-weight: 700;
    margin: 60px 0 30px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #eaeaea;
}

/* Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 100px;
}

/* Cards */
.project-card {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.project-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 8px;
    color: #fff;
}

.tag-congress { background: #2a7ae2; }
.tag-events { background: #2e9d4d; }
.tag-community { background: #e67e22; }

/* Fade-in */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp .6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.pdf-badge {
    display: inline-block;
    background: #d9534f;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 8px;
}



/* External link to projects - about.php */

.ext {
    margin-left: 214px;
}

.ext-link {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--link-color, #2a7ae2);
    text-decoration: none;
    font-weight: 500;
    transition: color .25s ease;
}

.ext-link:hover {
    color: var(--link-hover, #1a5ac7);
}

.ext-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: transform .25s ease, opacity .25s ease;
    opacity: 0.85;
}

.ext-link:hover .ext-icon {
    transform: translate(2px, -2px);
    opacity: 1;
}

/* Dark mode support */
body.dark .ext-link {
    color: var(--link-dark, #8ab4ff);
}

body.dark .ext-link:hover {
    color: var(--link-dark-hover, #a8c8ff);
}




/* Project and Documents @media */

@media (max-width: 600px) {

    /* STACK LAYOUT INSTEAD OF SIDE-BY-SIDE */
    .projects-layout {
        display: block !important;
        margin-top: 10px !important;
    }

    /* TIMELINE ON TOP, FULL WIDTH */
    .timeline-nav {
        width: 100% !important;
        position: relative !important;
        top: 0 !important;
        border-left: none !important;
        padding-left: 0 !important;
        margin-bottom: 20px !important;
        display: flex !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
    }

    .timeline-year-link {
        flex: 1 1 80px !important;
        text-align: center !important;
        padding: 10px !important;
        background: #f5f5f5 !important;
        border-radius: 6px !important;
        border: 1px solid #ddd !important;
    }

    .timeline-year-link.active {
        border: 1px solid #2a7ae2 !important;
        background: #e8f1ff !important;
        color: #2a7ae2 !important;
        padding-left: 10px !important;
        margin-left: 0 !important;
    }

    /* PROJECT GRID → SINGLE COLUMN */
    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* PROJECT CARDS */
    .project-card {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px !important;
        padding: 18px !important;
        font-size: 1.05rem !important;
    }

    /* DOCUMENT CARDS */
    .document-card {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 18px !important;
        padding: 16px !important;
        font-size: 1.05rem !important;
    }

    /* PDF BUTTON */
    .pdf-button {
        padding: 10px 16px !important;
        font-size: 1rem !important;
    }

    /* EXTERNAL LINK SECTION */
    .ext {
        margin-left: 0 !important;
        margin-top: 30px !important;
        text-align: center !important;
    }
}


/* Padding adjusted */

/* FORCE equal padding on Documents page */
@media (max-width: 600px) {
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

