body {
    background-color: #0a0f1e;
    color: #f8fafc;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#main-header {
    height: 15vh; /* Titre dans le même design */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.3);
    border-bottom: 1px solid #1e293b;
}

#main-header h1 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #38bdf8; /* Couleur accentuée */
}

/* Zone de la frise : 66.6% de la hauteur */
#timeline-viewport {
    height: 66.6vh; 
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 50px;
}

#timeline-belt {
    position: relative;
    width: 100%;
    height: 120px; /* Épaisseur réactive accrue pour la flèche */
}

/* L'axe central est une flèche épaisse */
.main-axis-arrow {
    position: absolute;
    top: 50%;
    left: 0;
    width: calc(100% - 30px);
    height: 4px; /* Réduit pour laisser de la place aux textes */
    background: #1e293b;
    border-radius: 6px;
    transform: translateY(-50%);
    z-index: 1;
}



#marks-container {
    position: relative;
    width: calc(100% - 30px); /* Alignement avec le corps de la flèche */
    height: 100%;
    z-index: 2;
}

.century-mark {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Tiret vertical */
.tick {
    width: 2px;
    height: 25px; /* Graduations légèrement plus longues */
    background: #334155;
    border-radius: 1px;
}

/* Label du siècle */
.century-label {
    position: absolute;
    top: 15px;
    font-size: 0.75rem;
    color: #475569;
    font-weight: bold;
}

/* Événements */
.event-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #38bdf8;
    border: 2px solid #0a0f1e;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    cursor: pointer;
    transition: transform 0.2s;
}

.event-marker:hover { transform: translate(-50%, -50%) scale(1.5); background: #f8fafc; }

.event-text {
    position: absolute;
    width: 140px; /* Légèrement plus étroit */
    font-size: 0.85rem;
    color: #cbd5e1;
    pointer-events: auto;
    cursor: pointer;
    text-align: center;
    z-index: 10;
}

/* Ligne de rappel */
.event-line {
    position: absolute;
    width: 1px;
    background: rgba(56, 189, 248, 0.4);
    z-index: 5;
    transition: transform 0.3s ease, background 0.3s ease;
    pointer-events: none; /* Ne bloque pas le survol des textes */
}

/* État quand le point est survolé */
.event-line.active {
    transform: scaleY(1.2);
    background: rgba(56, 189, 248, 1);
}

/* Priorité au survol */
.event-marker:hover, .event-text:hover {
    z-index: 50;
    color: #38bdf8;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* Tooltip Détails */
.tooltip-box {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background: #1e293b;
    border: 1px solid #38bdf8;
    padding: 15px;
    border-radius: 8px;
    display: none;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.tooltip-box h3 { margin: 0 0 10px 0; color: #38bdf8; font-size: 1rem; }
.tooltip-box p { margin: 0; font-size: 0.85rem; line-height: 1.5; color: #f8fafc; white-space: pre-line; }

/* Bouton Zoom */
.modern-btn {
    position: fixed;
    top: 18vh;
    left: 50%;
    transform: translateX(-50%);
    background: #38bdf8;
    color: #0a0f1e;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s;
}
.modern-btn:hover { background: #f8fafc; box-shadow: 0 0 15px rgba(56, 189, 248, 0.5); }