/* 
Version : 3.1 
Dernière mise à jour : 2025-01-05 
Description : Timeline à droite sur desktop et en bas sur mobile.
*/

/* Variables principales */
:root {
    --bs-primary: #6b4b3a; /* Marron harmonisé */
    --bs-secondary: #7b983c; /* Vert complémentaire */
    --bs-accent: #ffffff; /* Blanc éclatant pour le texte */
    --bs-body-bg: #ffffff; /* Couleur de fond */
    --bs-body-color: #212529; /* Couleur du texte */
    --bs-beige-light: #dedbd7; /* Beige clair */
    --bs-brown-dark: #584937; /* Marron foncé */
}

/* Corps global */
body {
    font-family: 'Lora', 'Arial', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    margin: 0;
    text-align: center;
    background: linear-gradient(to bottom, #ffffff, var(--bs-beige-light), var(--bs-primary));
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Liens */
a {
    color: var(--bs-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--bs-secondary);
    text-decoration: underline;
}

/* Boutons */
.btn {
    display: inline-block;
    font-weight: 400;
    color: var(--bs-accent);
    background: linear-gradient(180deg, var(--bs-beige-light), var(--bs-primary));
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, var(--bs-primary), var(--bs-brown-dark));
    box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.15);
}

/* Header */
header.custom-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--bs-primary), var(--bs-brown-dark));
    height: 180px;
    color: var(--bs-accent);
    font-family: 'Lora', serif;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.15);
}

.header-title {
    font-size: 2.8rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
}

/* Conteneur principal */
main {
    flex: 1;
    display: flex;
    flex-direction: row; /* Ligne horizontale sur desktop */
    justify-content: space-between;
    gap: 20px;
    margin-top: 2rem;
}

/* Texte principal */
.main-content {
    flex: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left;
}

/* Bloc timeline */
.timeline-container {
    flex: 1;
    max-width: 400px;
    margin: 0 auto;
    background-color: var(--bs-beige-light);
    border-radius: 0.375rem;
    padding: 20px;
    position: relative;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Titre de la timeline */
.timeline-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--bs-primary);
    margin: 0 0 20px;
}

/* Ligne centrale */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 80px; /* Ligne commence sous le titre */
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: calc(100% - 80px);
    background-color: var(--bs-primary);
    z-index: 1;
}

/* Conteneur d'un élément de la timeline */
.timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 50px;
}

.timeline-item.left {
    justify-content: flex-end;
}

.timeline-item.right {
    justify-content: flex-start;
}

/* Point de la timeline */
.timeline-point {
    width: 20px;
    height: 20px;
    background-color: var(--bs-secondary);
    border: 4px solid var(--bs-primary);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Infos (date et profession) */
.timeline-info {
    background-color: var(--bs-beige-light);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    font-size: 0.9rem;
    color: var(--bs-primary);
    max-width: 200px;
    text-align: center;
    z-index: 2;
}

.timeline-item.left .timeline-info {
    margin-right: 20px;
    text-align: right;
}

.timeline-item.right .timeline-info {
    margin-left: 20px;
    text-align: left;
}

/* Bulle d'information */
.timeline-content {
    position: fixed;
    background: var(--bs-beige-light);
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 3;
    max-width: 250px;
    white-space: normal;
}

/* Flèche des bulles */
.timeline-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: calc(50% - 5px);
    transform: rotate(45deg);
    width: 10px;
    height: 10px;
    background: var(--bs-beige-light);
}

/* Footer */
footer {
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--bs-primary), var(--bs-brown-dark));
    color: var(--bs-accent);
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.875rem;
    margin-top: 2rem;
    box-shadow: 0px -2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* Responsivité */
@media (max-width: 768px) {
    main {
        flex-direction: column; /* Passe tout en colonne sur mobile */
    }

    .timeline-container {
        order: 2; /* Place la timeline après le contenu principal */
        margin-top: 20px; /* Ajoute de l'espace au-dessus de la timeline */
    }

    .main-content {
        order: 1; /* Garde le contenu principal en haut */
    }
}
