/* Programme page: hero with the 24 h dial, sticky day / filter bar, metro-line timeline. */
html { scroll-padding-top: 92px }

/* ---------- hero ---------- */
.phero {
    position: relative;
    padding: clamp(28px, 4vw, 56px) max(5vw, 16px) clamp(64px, 7vw, 96px)
}

.pgrid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center
}

.phead .k { color: var(--yellow) }

.phead h1 {
    font: 800 clamp(40px, 6vw, 84px)/.98 var(--disp);
    letter-spacing: -.03em;
    text-transform: uppercase
}

.phead h1 .y { display: block; color: var(--yellow) }

.pstats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 26px 0 0;
    padding: 0
}

.pstats li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 9px 14px;
    border: 2px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    font: 500 13px/1 var(--mono);
    color: #d9d5ff
}

.pstats b { font: 800 17px/1 var(--disp); color: #fff }

.pstripes {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 18px;
    background: linear-gradient(var(--yellow) 0 3px, transparent 3px 5px, var(--orange) 5px 8px, transparent 8px 10px, var(--lilac) 10px 13px, transparent 13px 15px, var(--mint) 15px 18px)
}

/* ---------- 24 h dial ---------- */
.dial {
    position: relative;
    margin: 0;
    justify-self: center;
    width: 100%;
    max-width: 440px
}

.dial svg { display: block; width: 100%; height: auto; overflow: visible }
.dial .dl { font: 600 13px var(--mono); fill: #d9d5ff }
.dial .hand { transition: transform .4s }

.dial-in {
    position: absolute;
    left: 50%;
    top: 0;
    width: 52%;
    aspect-ratio: 1;
    transform: translate(-50%, 46%);
    display: grid;
    place-content: center;
    text-align: center;
    pointer-events: none
}

.dial-k { font: 500 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--yellow) }
.dial-t { font: 800 clamp(26px, 3.4vw, 40px)/1.1 var(--disp); letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 6px 0 }
.dial-s { font: 500 13px/1.3 var(--mono); color: #d9d5ff }

.dial-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    font: 500 12px/1.3 var(--mono);
    color: #d9d5ff
}

.dial-legend li { display: flex; align-items: center; gap: 7px }
.dial-legend i { width: 14px; height: 8px; border-radius: 4px }
.dial-legend i.nite { background: var(--night); outline: 1px solid rgba(255, 255, 255, .35) }

.dial figcaption {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: #c9c4e8
}

/* ---------- sticky bar ---------- */
.pbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
    padding: 12px max(5vw, 16px)
}

.pbar-in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    flex-wrap: wrap
}

.pdays, .pfilters { display: flex; gap: 6px; flex-wrap: wrap }

.pdays a, .pfilters button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 2px solid var(--rule);
    background: #fff;
    color: var(--night);
    font: 500 13px/1 var(--mono);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s
}

.pdays a b { font-family: var(--disp); font-weight: 800 }
.pdays a:hover, .pfilters button:hover { border-color: var(--indigo) }
.pdays a.on { background: var(--indigo); border-color: var(--indigo); color: #fff }
.pfilters i { width: 10px; height: 10px; border-radius: 50% }
.pfilters button[aria-pressed=true] { background: var(--night); border-color: var(--night); color: #fff }

/* ---------- timeline ---------- */
.pmain { padding-top: clamp(28px, 4vw, 48px) }
.pcount { font: 500 13px/1.4 var(--mono); color: var(--slate) }

.pday { margin-top: clamp(28px, 4vw, 48px) }

.pday-h {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding-bottom: 22px;
    border-bottom: 3px solid var(--night)
}

.pday-num {
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    border-radius: 26px;
    background: var(--yellow);
    font: 800 46px/1 var(--disp);
    letter-spacing: -.04em
}

.pday:nth-child(2) .pday-num { background: var(--orange) }
.pday:nth-child(3) .pday-num { background: var(--mint) }
.pday-num small { display: block; margin-top: -10px; font: 600 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase }
.pday-h .k { margin-bottom: 8px }
.pday-h h2 { font-size: clamp(24px, 3vw, 38px) }
.pday-txt { margin-top: 8px; color: var(--body); max-width: 62ch }

.line {
    --rail: 40px;
    --tcol: 92px;
    list-style: none;
    margin: 0;
    padding: 18px 0 0
}

.stop {
    position: relative;
    display: grid;
    grid-template-columns: var(--tcol) var(--rail) minmax(0, 1fr);
    align-items: start;
    gap: 0 14px;
    padding: 6px 0;
    transition: opacity .2s
}

/* the rail: one continuous track through every stop */
.stop::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--tcol) + 14px + var(--rail) / 2 - 4px);
    width: 8px;
    background: var(--indigo)
}

.line .stop:first-child::before { top: 26px; border-radius: 4px 4px 0 0 }
.line .stop:last-child::before { bottom: auto; height: 26px; border-radius: 0 0 4px 4px }

.stop time {
    padding-top: 12px;
    text-align: right;
    font: 700 17px/1.2 var(--mono);
    color: var(--night);
    font-variant-numeric: tabular-nums
}

.stop time small { display: block; margin-top: 4px; font-size: 13px; font-weight: 500; color: var(--slate) }
.stop time small::before { content: "→ " }
.stop time .tl { font-size: 15px }

.dot {
    position: relative;
    z-index: 1;
    justify-self: center;
    width: 26px;
    height: 26px;
    margin-top: 10px;
    border-radius: 50%;
    background: #fff;
    border: 5px solid var(--night);
    box-shadow: inset 0 0 0 4px var(--dotc, var(--indigo))
}

.c-stage { --dotc: var(--indigo) }
.c-build { --dotc: var(--orange) }
.c-ask { --dotc: var(--lilac) }
.c-food { --dotc: var(--yellow) }
.c-jury { --dotc: var(--mint) }

.card {
    padding: 14px 18px 16px;
    border-radius: 18px;
    background: var(--chalk);
    border: 2px solid transparent;
    transition: border-color .15s, transform .15s
}

.stop:hover .card { border-color: var(--rule) }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px 4px 7px;
    border-radius: 999px;
    background: #fff;
    font: 600 11px/1 var(--mono);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--night)
}

.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--orange)) }
.tag.hot { background: var(--orange); color: var(--night) }
.tag.hot::before { background: var(--night) }

.card h3 { font: 700 18px/1.35 var(--text) }

.place {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font: 500 13px/1.3 var(--mono);
    color: var(--slate)
}

/* temps forts: big station */
.stop.key .dot { width: 38px; height: 38px; margin-top: 4px; border-width: 6px; box-shadow: inset 0 0 0 7px var(--orange) }
.stop.key .card { background: #fff4ee; border-color: var(--orange) }
.stop.key .card h3 { font-family: var(--disp); font-size: 19px; letter-spacing: -.01em }
.stop.key time { color: var(--orange) }

/* the night: a dark band across the line */
.stop.night { background: var(--night); padding-inline: 0 14px; color: #fff }
.stop.night.nstart { border-radius: 22px 22px 0 0; padding-top: 34px; margin-top: 8px }
.stop.night.nend { border-radius: 0 0 22px 22px; padding-bottom: 16px }
.stop.night.nstart.nend { border-radius: 22px }

.stop.night.nstart::after {
    content: "// nuit de build ☾";
    position: absolute;
    top: 12px;
    left: calc(var(--tcol) + 14px + var(--rail) + 14px);
    font: 500 12px/1 var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--yellow)
}

.stop.night::before { background: repeating-linear-gradient(var(--yellow) 0 10px, transparent 10px 18px) }
.stop.night time { color: #fff }
.stop.night time small { color: #a7a2c9 }
.stop.night .card { background: rgba(255, 255, 255, .07) }
.stop.night:hover .card { border-color: rgba(255, 255, 255, .2) }
.stop.night .place { color: #a7a2c9 }
.stop.night .dot { border-color: var(--yellow) }

/* filter and live states */
.stop.dim { opacity: .22 }
.stop.past:not(.dim) { opacity: .6 }
.stop.past .dot { background: var(--dotc, var(--indigo)) }
.now-tag { display: none }

.stop.live .now-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--night);
    color: #fff;
    font: 600 11px/1 var(--mono);
    letter-spacing: .06em;
    text-transform: uppercase
}

.stop.live .now-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); animation: blink 1.2s infinite }
.stop.live .dot { animation: pulse 1.6s infinite }
.stop.live .card { border-color: var(--night) }

@keyframes pulse { 50% { box-shadow: inset 0 0 0 4px var(--dotc), 0 0 0 9px rgba(58, 43, 216, .2) } }
@keyframes blink { 50% { opacity: .2 } }

/* ---------- deadlines and rules ---------- */
.tickets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 32px
}

.ticket {
    position: relative;
    padding: 24px 24px 26px;
    border-radius: 22px;
    background: #fff;
    border-top: 10px solid var(--tc)
}

.t-orange { --tc: var(--orange) }
.t-yellow { --tc: var(--yellow) }
.t-mint { --tc: var(--mint) }

.tk-when {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 2px dashed var(--rule);
    font: 500 18px/1 var(--mono);
    color: var(--slate)
}

.tk-when b { font: 800 30px/1 var(--disp); color: var(--night); letter-spacing: -.03em; margin-right: 8px }
.ticket h3 { font: 700 20px/1.2 var(--disp); letter-spacing: -.01em }
.ticket p:last-child { margin-top: 8px; color: var(--body) }

.rules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--rule)
}

.rules h3 { font: 500 13px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--indigo) }
.rules p { margin-top: 8px; color: var(--body) }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .pgrid { grid-template-columns: minmax(0, 1fr) }
    .dial { max-width: 400px }
    .tickets, .rules { grid-template-columns: minmax(0, 1fr) }
}

@media (max-width: 820px) {
    html { scroll-padding-top: 130px }
    .pbar { padding-block: 10px }
    .pbar-in { gap: 8px }
    .pdays, .pfilters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * max(5vw, 16px)); padding-inline: max(5vw, 16px); width: calc(100% + 2 * max(5vw, 16px)) }
    .pdays a, .pfilters button { flex: none; min-height: 38px; padding: 7px 12px }
    .pdays::-webkit-scrollbar, .pfilters::-webkit-scrollbar { display: none }
}

@media (max-width: 640px) {
    /* hero */
    .phero .ctas .btn { flex: 1 1 auto }
    .pstats li { padding: 8px 12px }
    .dial { max-width: 340px }
    .dial-t { font-size: 24px }
    .dial figcaption { font-size: 13px }

    /* day header: date tile beside the title */
    .pday-h { grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding-bottom: 18px }
    .pday-num { width: 64px; height: 64px; border-radius: 18px; font-size: 28px }
    .pday-num small { margin-top: -4px; font-size: 10px }
    .pday-h .k { margin-bottom: 4px; font-size: 12px }
    .pday-h h2 { font-size: 22px }
    .pday-txt { font-size: 15px }

    /* timeline: line on the left, time above each card, card takes the full width */
    .line { --rail: 28px; padding-top: 14px }
    .stop { grid-template-columns: var(--rail) minmax(0, 1fr); gap: 0 10px; padding: 7px 0 }
    .stop::before { left: calc(var(--rail) / 2 - 3px); width: 6px }
    .line .stop:first-child::before { top: 18px }
    .line .stop:last-child::before { height: 18px }
    .stop time { grid-column: 2; grid-row: 1; display: flex; align-items: baseline; gap: 8px; padding-top: 0; text-align: left; font-size: 15px }
    .stop time small { display: inline; margin: 0; font-size: 12px }
    .stop time .tl { font-size: 14px }
    .dot { grid-column: 1; grid-row: 1 / span 2; width: 24px; height: 24px; margin-top: -2px; border-width: 4px }
    .stop.key .dot { width: 28px; height: 28px; margin-top: -4px; border-width: 5px; box-shadow: inset 0 0 0 5px var(--orange) }
    .card { grid-column: 2; grid-row: 2; margin-top: 8px; padding: 12px 14px 14px; border-radius: 14px }
    .card h3, .stop.key .card h3 { font-size: 16px }
    .tags { margin-bottom: 6px }

    /* night band */
    .stop.night { margin-inline: -10px; padding: 7px 10px }
    .stop.night::before { left: calc(10px + var(--rail) / 2 - 3px) }
    .stop.night .dot { margin-left: 0 }
    .stop.night.nstart { padding-top: 38px; border-radius: 18px 18px 0 0 }
    .stop.night.nend { padding-bottom: 12px; border-radius: 0 0 18px 18px }
    .stop.night.nstart.nend { border-radius: 18px }
    .stop.night.nstart::after { top: 14px; left: calc(var(--rail) + 20px) }

    /* deadlines */
    .tickets { gap: 14px; margin-top: 24px }
    .ticket { padding: 18px 20px 20px }
    .tk-when { padding-bottom: 12px; margin-bottom: 12px }
    .tk-when b { font-size: 26px }
}

@media (prefers-reduced-motion: reduce) {
    .stop.live .dot, .stop.live .now-tag::before { animation: none }
    .stop, .card, .dial .hand { transition: none }
}
