/* Styles communs des pages trail.html et trail-beaujolais.html */
.prep {
    --fg: #222; --muted: #6b6b6b; --line: #dddddd; --panel: #f7f7f8;
    --plan: #9db7d6; --done: #1772d0; --over: #2e8b57; --under: #d9822b;
    --today: #f09228;
    --ph-recup: #eef3f8; --ph-base: #f3f6ee; --ph-specifique: #f8f1ea; --ph-montagne: #f1eef8; --ph-affutage: #f8eef2; --ph-avant: #f4f4f4;
}
@media (prefers-color-scheme: dark) {
    .prep {
        --fg: #e4e4e7; --muted: #a1a1aa; --line: #3f3f46; --panel: #1f1f23;
        --plan: #3d5878; --done: #6cb2ff; --over: #5cc98c; --under: #f5a54a;
        --today: #f5a54a;
        --ph-recup: #1b2129; --ph-base: #1d221a; --ph-specifique: #261f19; --ph-montagne: #211d29; --ph-affutage: #271c21; --ph-avant: #1e1e20;
    }
}
.prep p { line-height: 1.5; }
.prep .muted { color: var(--muted); font-size: 13px; }
.prep .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 4px; }
.prep .stat { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; }
.prep .stat .v { font-size: 22px; font-variant-numeric: tabular-nums; margin: 2px 0; }
.prep .stat .l { color: var(--muted); font-size: 12px; }
.prep .toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin: 6px 0 10px; }
.prep .toggle button { font: inherit; font-size: 13px; padding: 5px 12px; border: 0; background: transparent; color: var(--fg); cursor: pointer; }
.prep .toggle button[aria-pressed="true"] { background: var(--done); color: #fff; }
.prep .chart { position: relative; width: 100%; }
.prep .chart svg { display: block; width: 100%; height: auto; }
.prep .chart text { fill: var(--muted); font-size: 11px; font-family: 'Lato', Verdana, Helvetica, sans-serif; }
.prep .tip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px; font-size: 12px; line-height: 1.45; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.12); display: none; z-index: 5; }
.prep .legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.prep .sw { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.prep .tw { overflow-x: auto; }
.prep table.weeks { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.prep table.weeks th, .prep table.weeks td { font-size: 13px; padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.prep table.weeks th { color: var(--muted); font-weight: normal; white-space: nowrap; }
.prep table.weeks td { white-space: nowrap; }
.prep table.weeks td.l, .prep table.weeks th.l { text-align: left; }
.prep table.weeks td.s { white-space: normal; min-width: 180px; }
.prep table.weeks tr.phase td { background: var(--panel); font-weight: bold; text-align: left; padding-top: 10px; }
.prep table.weeks tr.now td { box-shadow: inset 0 0 0 9999px rgba(240, 146, 40, .12); }
.prep .ok { color: var(--over); } .prep .ko { color: var(--under); }
.prep details summary { cursor: pointer; color: var(--muted); }
@media (max-width: 600px) {
    .prep .tw { max-width: calc(100vw - 40px); }
    .prep table.weeks th, .prep table.weeks td { font-size: 12px; padding: 5px 4px; white-space: normal; }
    .prep table.weeks td.s { min-width: 0; }
}

/* Navigation entre les pages trail */
.prep .nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 18px; border-bottom: 1px solid var(--line); }
.prep .nav a { padding: 6px 10px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.prep .nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--done); }
.prep .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.prep .card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; min-width: 0; }
.prep h3 { font-size: 15px; font-weight: bold; margin: 0 0 4px; }
.prep .hr-line { stroke: var(--under); }
.prep table.weeks td.wrap { white-space: normal; }

/* Session type badges */
.prep .sb { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.prep .sb-ef      { background: var(--over); }
.prep .sb-qualite { background: var(--done); }
.prep .sb-sl      { background: var(--today); }

/* Session sub-rows */
.prep table.weeks tr.sess td { border-top: none; padding-top: 2px; padding-bottom: 2px; }
.prep table.weeks td.type-cell { white-space: nowrap; color: var(--muted); font-size: 12px; }
