/* Variables de la charte graphique */
:root {
    --color-blue: #00A3E0;
    --color-green: #73C92D;
    --color-grey: #91999F;
    --bg-color: #f4f6f8;
    --text-color: #333;
}

/* Base */
body {
    font-family: 'Trebuchet MS', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
}

header {
    background-color: var(--color-blue);
    color: white;
    text-align: center;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header p {
    margin: 5px 0 0 0;
    color: #e0f2fe;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

/* La ligne grise verticale */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--color-grey);
    top: 0;
    bottom: 0;
    left: 60px;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    width: 100%;
    /* On ajuste le padding gauche à 90px (au lieu de 110px) car le cercle a reculé */
    /* Et on met le padding top à 0 pour s'aligner avec le cercle */
    padding: 0 0 40px 90px; 
    box-sizing: border-box;
}

/* Le cercle centré sur la ligne */
.timeline-circle {
    position: absolute;
    left: 40px; /* <-- Ton choix */
    top: 0px;   /* <-- Ton choix */
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background-color: var(--color-green);
    border: 4px solid var(--bg-color); 
    border-radius: 50%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 0 0 2px var(--color-grey);
}

.timeline-circle .date {
    font-size: 0.75rem;
    font-weight: bold;
}

.timeline-circle .time {
    font-size: 0.65rem;
    opacity: 0.9;
}

.timeline-content {
    padding: 20px;
    background-color: white;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border-left: 5px solid var(--color-blue);
}

.timeline-content img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
    background-color: var(--color-grey); /* Fallback si pas d'image */
}

.timeline-content h2 {
    margin: 0 0 10px 0;
    color: var(--color-blue);
}

.timeline-content p {
    margin: 0;
    line-height: 1.5;
    color: var(--color-grey);
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: var(--color-green);
    font-weight: bold;
    font-size: 0.9em;
}

/* Modal (Détails) */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    color: var(--color-grey);
    cursor: pointer;
}

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

.modal-body img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-body h2 {
    color: var(--color-blue);
}

.keywords {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.tag {
    display: inline-block;
    background-color: var(--color-green);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    margin-right: 5px;
    margin-bottom: 5px;
}

.hidden {
    display: none !important;
}

.loader {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: var(--color-blue);
}

footer {
    background-color: var(--color-grey);
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .timeline::after {
        left: 40px;
    }
    .timeline-item {
        padding-left: 80px;
    }
    .timeline-circle {
        left: 40px;
        width: 55px;
        height: 55px;
    }
    .timeline-circle .date {
        font-size: 0.65rem;
    }
    .timeline-circle .time {
        font-size: 0.55rem;
    }
}