/* style.css - Identité Visuelle Cohérente et Typographie Lisible */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700;800&family=Playfair+Display:wght@700&display=swap');

:root {
    --color-primary: #1A3E6D; /* Bleu Marine Classique (pour la rigueur) */
    --color-accent: #B31B1B; /* Rouge Bordeaux / Profond (pour l'alerte/accent) */
    --color-light: #F8F9FA; /* Fond Blanc très léger */
    --color-text: #333333; /* Texte Noir Profond */
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Open Sans', sans-serif; /* Corps du texte (Simplicité et Lisibilité) */
    line-height: 1.6;
    margin: 0;
    background-color: var(--color-light);
    color: var(--color-text);
    overflow-x: hidden; 
}

/* --- HEADER / NAVIGATION --- */
header {
    /* Dégradé subtil en Bleu Marine */
    background: linear-gradient(90deg, #1A3E6D 0%, #2A538F 100%);
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-family: 'Playfair Display', serif; /* Logo 'Medi'Actus' */
    margin: 0 0 1rem 0;
    font-size: 2.8rem;
    /* Dégradé de texte pour un look premium */
    background: linear-gradient(45deg, #FFFFFF, #B3C4E5); 
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav#main-nav {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 5px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    overflow-x: auto;
    white-space: nowrap; 
}

nav#main-nav a {
    flex-shrink: 0;
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    /* La police du texte (Open Sans) est héritée du 'body' */
    font-weight: 800; /* Cette graisse devrait rendre les noms plus épais */
    transition: background-color 0.3s, color 0.3s;
    border-radius: 4px;
}

nav#main-nav a:hover {
    background-color: var(--color-accent);
    color: white;
}

/* --- MAIN CONTENT / ARTICLES LIST --- */
main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

h2 {
    font-family: 'Playfair Display', serif; /* Titres de section */
    color: var(--color-primary);
    border-bottom: 3px solid var(--color-accent); /* Ligne Rouge Accente */
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 30px;
}

#articles-list article {
    background: white;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    display: flex;
    overflow: hidden; 
    transition: transform 0.3s;
}

#articles-list article:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

#articles-list .featured-image {
    width: 350px;
    height: 200px;
    object-fit: cover;
}

#articles-list .content {
    padding: 20px;
}

#articles-list h3 {
    font-family: 'Playfair Display', serif; /* Titres d'articles */
    color: var(--color-primary);
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.date {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 10px;
    display: block;
}

.excerpt {
    color: var(--color-text);
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid var(--color-accent);
    transition: color 0.3s, border-color 0.3s;
}

.read-more:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* --- TIMELINE LIVE --- */
#live-feed h2 {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

#timeline {
    position: relative;
    padding: 20px 0;
}

/* Ligne centrale de la timeline (dégradé Bleu/Rouge) */
#timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    background: linear-gradient(to bottom, var(--color-accent), var(--color-primary));
    height: 100%;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.timeline-dot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 20px;
    height: 20px;
    background: var(--color-accent);
    border: 4px solid white; 
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 0 5px rgba(179, 27, 27, 0.3);
}

.timeline-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    width: 45%; 
    position: relative;
    text-align: left;
    transition: background-color 0.3s;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 55%; 
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 55%; 
}

.timeline-content:hover {
    background-color: #fcebeb;
}

.timestamp {
    display: block;
    font-size: 0.9em;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 8px;
}

.timeline-content h4 {
    font-family: 'Playfair Display', serif; /* Titres du Fil Info (Alerte) */
    color: var(--color-primary);
    margin-top: 0;
    font-size: 1.25rem;
}

.article-content {
    font-size: 0.95rem;
    color: #555;
}


/* --- STYLE SPECIFIQUE POUR ARTICLE.HTML --- */

.full-article {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    line-height: 1.7;
}

.article-title {
    font-family: 'Playfair Display', serif; /* Titre H1 de l'article */
    font-size: 2.5rem;
    color: var(--color-text);
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 10px;
}

.article-meta {
    color: #888;
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 25px;
}

.article-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    margin-bottom: 30px;
    border-radius: 6px;
}

.article-content-body {
    font-size: 1.1rem;
}

.article-content-body p {
    margin-bottom: 1.5em;
    text-align: justify;
}

.article-content-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 4px;
}

/* =======================================================
   ADAPTATION RESPONSIVE
   ======================================================= */

/* Adaptation pour Tablettes (max-width: 992px) */
@media (max-width: 992px) {
    main { padding: 0 15px; }
    #articles-list article { flex-direction: column; }
    #articles-list .featured-image { width: 100%; max-height: 250px; height: auto; }
    .timeline-content { width: 60%; }
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content { margin: 0 auto; }
}

/* Adaptation pour Smartphones (max-width: 768px) */
@media (max-width: 768px) {
    header h1 { font-size: 2rem; margin-bottom: 0.5rem; }
    
    nav#main-nav { gap: 10px; }
    nav#main-nav a { font-size: 0.85rem; padding: 6px 10px; }

    #articles-list article { flex-direction: column; }
    #articles-list .featured-image { width: 100%; height: auto; }
    
    #timeline::before { left: 20px; }
    .timeline-dot { left: 20px; transform: translate(-50%, 0); }

    .timeline-item { justify-content: flex-start; }

    .timeline-content {
        width: calc(100% - 65px);
        margin-left: 65px !important;
        margin-right: 0 !important;
    }
    
    .full-article { padding: 20px; }
    .article-title { font-size: 1.8rem; }
    .article-content-body { font-size: 1rem; }
}

/* Adaptation pour Très Petits Écrans (max-width: 480px) */
@media (max-width: 480px) {
    header { padding: 1rem 1rem; }
    header h1 { font-size: 1.8rem; }
    
    #articles-list .content { padding: 15px; }
    #articles-list h3 { font-size: 1.3rem; }

    .timeline-content {
        padding: 15px;
        width: calc(100% - 50px); 
        margin-left: 50px !important; 
    }
    #timeline::before, .timeline-dot { left: 10px; }
}