/* ── scroll-margin pour les ancres sous la nav sticky ── */
section[id] { scroll-margin-top: 130px; }


/* =========================
   NAV ANCRES (sticky sous le header)
========================= */
.page-nav {
    position: sticky;
    top: var(--nav-h);
    z-index: 90;
    background: var(--white);
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.page-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.page-nav-inner::-webkit-scrollbar { display: none; }

.page-nav-inner a {
    flex-shrink: 0;
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-400);
    padding: 16px 14px 14px;
    border-bottom: 3px solid transparent;
    transition: color var(--transition), border-color var(--transition);
    white-space: nowrap;
}
.page-nav-inner a:hover { color: var(--black); }
.page-nav-inner a.active {
    color: var(--red);
    border-bottom-color: var(--red);
}


/* =========================
   CONTAINER PRINCIPAL
========================= */
.course-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 70px 28px 90px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}


/* =========================
   SECTIONS
========================= */
.course-section {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0 40px;
    padding: 60px 0;
    border-bottom: 1px solid #eee;
}
.course-section:last-child { border-bottom: none; }

/* Numéro de section */
.course-section-label {
    padding-top: 6px;
}
.course-section-label .section-label {
    font-size: 13px;
    letter-spacing: 1px;
}

/* Corps de section */
.course-section-body h2 {
    font-family: var(--font-head);
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 800;
    color: var(--black);
    margin-bottom: 16px;
    letter-spacing: -0.3px;
    line-height: 1.15;
}
.course-section-body > p {
    font-size: 16px;
    line-height: 1.85;
    color: var(--gray-700);
    margin-bottom: 14px;
    font-family: var(--font-body);
}
.course-section-body > p strong {
    color: var(--black);
    font-weight: 700;
    font-family: var(--font-head);
}


/* =========================
   CARTES INFO (épreuve)
========================= */
.info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 32px;
}
.info-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--gray-100);
    border: 1px solid #e8e8e8;
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.info-card:hover {
    border-color: var(--red);
    box-shadow: 0 4px 16px rgba(216,35,42,0.08);
}
.info-card-icon { font-size: 24px; flex-shrink: 0; }
.info-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.info-card-text strong {
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--red);
}
.info-card-text span {
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
}


/* =========================
   TIMELINE (déroulé)
========================= */
.timeline {
    list-style: none;
    margin-top: 32px;
    position: relative;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ligne verticale — part du bord gauche du contenu */
.timeline::before {
    content: "";
    position: absolute;
    left: 100px;          /* alignée avec le centre du point */
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: #e8e8e8;
}

.timeline li {
    display: grid;
    grid-template-columns: 100px 28px 1fr;  /* heure | espace point | contenu */
    gap: 0 16px;
    margin-bottom: 36px;
    position: relative;
    align-items: start;
}
.timeline li:last-child { margin-bottom: 0; }

/* point rouge centré dans la colonne du milieu */
.tl-dot {
    display: flex;
    justify-content: center;
    padding-top: 4px;
    position: relative;
    z-index: 1;
}
.tl-dot::after {
    content: "";
    width: 14px;
    height: 14px;
    background: var(--red);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--red);
    flex-shrink: 0;
}

.tl-time {
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 0.5px;
    text-align: right;
    padding-top: 2px;
    line-height: 1.5;
    word-break: keep-all;
}

.tl-content strong {
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    display: block;
    margin-bottom: 4px;
}
.tl-content p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray-700);
    font-family: var(--font-body);
    margin: 0;
}


/* =========================
   PARCOURS (options)
========================= */
.parcours-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 28px 0 20px;
}
.parcours-card {
    background: var(--gray-100);
    border: 2px solid #e8e8e8;
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.parcours-card:hover {
    border-color: #ccc;
    box-shadow: var(--shadow-sm);
}
.parcours-card--main {
    background: var(--red-light);
    border-color: var(--red);
}
.parcours-card--main:hover {
    border-color: var(--red-dark);
    box-shadow: 0 4px 20px rgba(216,35,42,0.15);
}
.parcours-distance {
    font-family: var(--font-head);
    font-size: 40px;
    font-weight: 900;
    color: var(--red);
    line-height: 1;
    margin-bottom: 4px;
}
.parcours-label {
    font-family: var(--font-head);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray-700);
    margin-bottom: 12px;
}
.parcours-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray-700);
    font-family: var(--font-body);
}
.parcours-note {
    font-size: 14px !important;
    color: var(--gray-400) !important;
}


/* =========================
   SÉCURITÉ
========================= */
.securite-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 28px;
}
.securite-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 16px 20px;
    border: 1px solid #e8e8e8;
}
.securite-icon { font-size: 22px; flex-shrink: 0; }
.securite-item span {
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
}


/* =========================
   SECTION INSCRIPTIONS
========================= */
.course-section--cta .course-section-body h2 {
    margin-bottom: 8px;
}
.widget-wrapper {
    margin-top: 28px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #e8e8e8;
    background: var(--white);
}


/* =========================
   RESPONSIVE — TABLETTE (≤ 900px)
========================= */
@media (max-width: 900px) {
    .course-section {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 44px 0;
    }
    .course-section-label { padding-top: 0; }

    .info-cards { grid-template-columns: 1fr; }
    .parcours-options { grid-template-columns: 1fr; }

    .timeline::before { left: 0; display: none; }
    .timeline li {
        grid-template-columns: auto 20px 1fr;
        gap: 0 12px;
    }
    .tl-time { text-align: right; font-size: 11px; }
    .tl-dot::after { width: 12px; height: 12px; }
}


/* =========================
   RESPONSIVE — MOBILE (≤ 768px)
========================= */
@media (max-width: 768px) {
    .course-container { padding: 44px 20px 60px; }

    .page-nav-inner { padding: 0 16px; }
    .page-nav-inner a { font-size: 12px; padding: 14px 10px 12px; }

    .course-section { padding: 36px 0; gap: 6px; }
    .course-section-body h2 { font-size: 22px; }
    .course-section-body > p { font-size: 15px; }

    .info-card { padding: 14px 16px; }
    .parcours-card { padding: 22px 18px; }
    .parcours-distance { font-size: 32px; }
}
