/* /var/www/staphy/public/css/trek.css (VERSION FINALE & POLIE) */

/* Définition des variables de thème. Avoir le --accent-color est bien pour la cohérence */
:root {
    --trek-color-primary: #3b82f6;
    --trek-color-secondary: #1f2937;
    --trek-color-background: #f8fafc; /* Fond légèrement gris, plus doux que blanc pur */
    --trek-color-text: #374151; /* Gris de texte principal */
}

body.page-trek {
    background-color: var(--trek-color-background);
}

.site-content {
    /* Cet espacement est crucial pour que le contenu ne passe pas sous la navbar fixe */
    padding-top: 80px; /* Ajuste à la hauteur de ta navbar mobile */
}
@media (min-width: 992px) {
    .site-content {
        padding-top: 90px; /* Ajuste à la hauteur de ta navbar desktop */
    }
}

/* --- SECTION HERO/HEADER --- */
.trek-header {
    position: relative;
    height: 60vh; /* Hauteur relative à la fenêtre */
    min-height: 400px;
    background-size: cover;
    background-position: center 30%; /* Centre l'image un peu plus haut */
    color: white;
    display: flex;
    align-items: flex-end; /* Aligne le contenu en bas */
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
}

.header-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    /* Dégradé plus prononcé en bas pour la lisibilité du texte */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.3) 100%);
}

.header-content { position: relative; z-index: 1; max-width: 800px; }
.trek-badge {
    background-color: var(--trek-color-primary);
    color: white; font-size: 0.8rem; font-weight: 700;
    padding: 0.3rem 0.8rem; border-radius: 99px;
    display: inline-block; margin-bottom: 1rem;
    text-transform: uppercase; letter-spacing: 0.05em;
}

.trek-header h1 {
    font-size: clamp(2rem, 6vw, 3.5rem); /* Police responsive */
    font-weight: 800; margin: 0 0 1.5rem;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.header-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; font-size: 1.1rem; opacity: 0.9; }

/* --- MISE EN PAGE PRINCIPALE --- */
.trek-layout {
    display: grid; grid-template-columns: 1fr; /* Mobile-first: 1 colonne */
    gap: 2rem; max-width: 1280px; margin: 0 auto;
    padding: 3rem 1.5rem;
}
@media (min-width: 992px) {
    .trek-layout { grid-template-columns: minmax(320px, 380px) 1fr; gap: 3rem; align-items: start; }
}

/* --- SIDEBAR DE GAUCHE --- */
.sidebar-sticky-content { display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 992px) {
    .sidebar-sticky-content { position: -webkit-sticky; position: sticky; top: 120px; /* Doit être > hauteur navbar + padding */ }
}
.sidebar-widget {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.widget-title {
    font-size: 1.25rem; font-weight: 700; color: var(--trek-color-secondary);
    margin: 0 0 1rem; border-bottom: 2px solid var(--trek-color-primary); padding-bottom: 0.5rem;
}
.widget-text { line-height: 1.6; color: var(--trek-color-text); }
.map-container { height: 350px; border-radius: 8px; border: 1px solid #e5e7eb; }


/* --- TIMELINE DE DROITE --- */
.trek-timeline-content { min-width: 0; } /* Empêche les débordements de texte */
.timeline-title {
    font-size: 2.25rem; font-weight: 800;
    margin-bottom: 2.5rem; color: var(--trek-color-secondary);
    text-align: center;
}
@media (min-width: 768px) { .timeline-title { text-align: left; } }

.timeline { position: relative; border-left: 3px solid #e5e7eb; padding: 0.5rem 0; }
.timeline-item { display: flex; position: relative; margin-bottom: 3rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-point {
    position: absolute; left: -16.5px; /* (30px / 2) + 1.5px (demi-bordure) */
    top: 2rem; transform: translateY(-50%); width: 30px; height: 30px; background-color: var(--trek-color-background);
    border-radius: 50%; border: 3px solid #e5e7eb; z-index: 1;
    display: flex; align-items: center; justify-content: center;
}
.timeline-point-inner { width: 12px; height: 12px; background-color: var(--trek-color-primary); border-radius: 50%; }

.timeline-content { padding-left: 2.5rem; width: 100%; }
.etape-card {
    background-color: #fff; border-radius: 12px;
    border: 1px solid #e5e7eb; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    padding: 1.5rem; transition: box-shadow 0.3s, transform 0.3s;
}
.etape-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.07); }
.etape-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.75rem; flex-wrap: wrap; gap: 0.5rem; }
.etape-number {
    font-size: 0.8rem; font-weight: 700; color: #fff;
    background-color: var(--trek-color-secondary); padding: 0.2rem 0.6rem; border-radius: 99px;
}
.etape-date { font-size: 0.9rem; color: #6b7280; font-family: monospace; }
.etape-title { font-size: 1.5rem; margin: 0 0 1rem; }
.etape-title a { text-decoration: none; color: var(--trek-color-secondary); transition: color 0.2s; }
.etape-title a:hover { color: var(--trek-color-primary); }

.etape-image-link { display: block; margin-bottom: 1rem; }
.etape-image-link img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }

.etape-excerpt { margin-bottom: 1.5rem; color: var(--trek-color-text); line-height: 1.6; }
.etape-footer {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
    gap: 1rem; border-top: 1px solid #e5e7eb; padding-top: 1rem;
}
.etape-meta { display: flex; gap: 1.5rem; color: #6b7280; font-size: 0.9rem; }
.btn-cta {
    background: var(--trek-color-primary); color: white; border: 2px solid var(--trek-color-primary);
    padding: 0.5rem 1rem; text-decoration: none; font-weight: 600; border-radius: 8px;
    transition: all 0.2s;
}
.btn-cta:hover { background-color: var(--trek-color-secondary); border-color: var(--trek-color-secondary); }

/* ----- ANIMATIONS --- */
.anim-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.anim-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* Dans ton fichier css/trek.css */
.header-dates {
    margin-top: 15px;
    font-size: 0.9em;
    font-style: italic;
    opacity: 0.9;
    color: #fff; /* ou la couleur que tu veux */
}
