/* Page « Comment naît une idée » (FR /comment-nait-une-idee/, EN /en/how-an-idea-is-born/).
   Chargée uniquement sur cette page. Toujours sombre, quel que soit le thème du site.
   Langage : Helvetica du site pour les claims, fonte technique pour les données, fil rouge et losanges de checkpoint. */
.asc-page {
  --nuit: #0e0f0f; --blanc: #eeede8; --gris: #8e8d88; --fil: #d7262e;
  --pad: var(--gutter);
  --asc-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --asc-ease: cubic-bezier(.2, .7, 0, 1);
  background: var(--nuit); color: var(--blanc);
}
.page-ascension { background: #0e0f0f; }
.asc-page .asc-label { font-family: var(--asc-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); }
.asc-page .asc-wide { font-weight: 800; text-transform: uppercase; letter-spacing: -.045em; line-height: .9; text-wrap: balance; }
.asc-page .dia { display: inline-block; width: 8px; height: 8px; flex: none; transform: rotate(45deg); background: var(--fil); }
.asc-page .asc-thread { display: inline-block; width: 18px; height: 2px; background: var(--fil); border-radius: 2px; }

/* La randonnée */
.asc-ascent { position: relative; height: 1000vh; }
.asc-stage { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.asc-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.asc-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(14,15,15,.72) 0%, rgba(14,15,15,.2) 45%, transparent 70%); }
.asc-opening { position: absolute; left: var(--pad); bottom: clamp(40px, 10vh, 120px); z-index: 5; max-width: min(820px, 90vw); transition: opacity .8s var(--asc-ease), transform .8s var(--asc-ease); }
.asc-opening h1 { margin: 16px 0 22px; font-size: clamp(2.4rem, 5.2vw, 5.4rem); max-width: 12ch; }
.asc-opening .lead { color: #d4d3ce; max-width: 40ch; }
.asc-opening .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.asc-opening .asc-credit { margin: 22px 0 0; max-width: 46ch; }
.asc-opening.is-off { opacity: 0; transform: translateY(-20px); pointer-events: none; }
.asc-hint { position: absolute; left: 50%; bottom: 26px; z-index: 5; margin: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; transition: opacity .4s; }
.asc-hint i { width: 1px; height: 40px; background: linear-gradient(var(--blanc), transparent); animation: asc-hint 2.4s var(--asc-ease) infinite; transform-origin: top; }
@keyframes asc-hint { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Chaque checkpoint : numéro + étape (mono) → lieu + altitude (mono blanc) → claim (Helvetica) → texte */
.asc-page .chapter { position: absolute; left: var(--pad); bottom: clamp(44px, 11vh, 130px); z-index: 5; width: min(760px, 88vw); opacity: 0; transform: translateY(-14px); filter: blur(6px); transition: opacity .35s ease, transform .35s ease, filter .35s ease; pointer-events: none; }
.asc-page .chapter.is-on { opacity: 1; transform: none; filter: none; transition: opacity 1s var(--asc-ease) .35s, transform 1s var(--asc-ease) .35s, filter 1s var(--asc-ease) .35s; }
.asc-page .chapter .kicker { display: flex; align-items: center; gap: 10px; margin: 0; }
.asc-page .chapter .kicker .step { color: var(--blanc); }
.asc-page .chapter .kicker .step::before { content: "·"; margin-right: 10px; color: var(--gris); }
.asc-page .cp-where { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 14px; row-gap: 2px; margin: 10px 0 0; padding-bottom: 14px; border-bottom: 1px solid rgba(238,237,232,.16); max-width: 34ch; font-family: var(--asc-mono); font-size: clamp(.82rem, .95vw, .95rem); letter-spacing: .06em; text-transform: uppercase; line-height: 1.35; }
.asc-page .cp-where span { color: var(--gris); font-size: .8em; }
.asc-page .chapter h2 { margin: 18px 0 14px; font-size: clamp(1.6rem, 2.9vw, 2.9rem); }
.asc-page .chapter p { margin: 0; font-size: clamp(1rem, 1.1vw, 1.1rem); line-height: 1.5; color: #cfcec9; max-width: 52ch; }
.asc-page .chapter-summit h2 { font-size: clamp(1.9rem, 3.6vw, 3.6rem); }
.asc-page .chapter .proof { margin-top: 24px; font-size: clamp(1.1rem, 1.6vw, 1.45rem); line-height: 1.38; color: var(--gris); max-width: 34ch; }
.asc-page .proof b { color: var(--blanc); font-weight: 700; }
.asc-page .chapter .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; pointer-events: auto; }

/* Carton d'arrivée à un checkpoint */
.asc-page .cp-card { position: absolute; left: 50%; top: clamp(96px, 17vh, 180px); z-index: 7; transform: translateX(-50%); width: min(92vw, 900px); text-align: center; pointer-events: none; opacity: 0; transition: opacity .7s ease; }
.asc-page .cp-card.is-on { opacity: 1; transition: opacity .3s ease; }
.asc-page .cp-top { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0; color: var(--blanc); }
.asc-page .cp-top i { height: 1px; width: 0; background: var(--fil); transition: width 1s var(--asc-ease) .15s; }
.asc-page .cp-card.is-on .cp-top i { width: clamp(36px, 8vw, 120px); }
.asc-page .cp-name { margin: 14px 0 10px; font-size: clamp(1.25rem, 2.4vw, 2.3rem); letter-spacing: .14em; opacity: 0; transition: letter-spacing 1.6s var(--asc-ease), opacity .9s ease; }
.asc-page .cp-card.is-on .cp-name { letter-spacing: -.03em; opacity: 1; }
.asc-page .cp-meta { margin: 0; }

/* Marqueur du prochain checkpoint */
.asc-page .waypoint { position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; display: flex; flex-direction: column; align-items: center; opacity: 0; transition: opacity .5s ease; will-change: transform; }
.asc-page .waypoint.is-on { opacity: 1; }
.asc-page .wp-tag { display: flex; align-items: center; gap: 10px; padding: 7px 11px; border: 1px solid rgba(238,237,232,.28); border-radius: 2px; background: rgba(14,15,15,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); white-space: nowrap; }
.asc-page .wp-tag .dia { background: none; border: 1px solid var(--blanc); }
.asc-page .wp-tag .wp-n, .asc-page .wp-tag .wp-d { color: var(--blanc); font-variant-numeric: tabular-nums; }
.asc-page .waypoint > i { width: 1px; height: 30px; background: linear-gradient(rgba(238,237,232,.75), rgba(238,237,232,0)); }

/* Tableau de bord : checkpoints, altitude, distance, profil */
.asc-page .profile { position: absolute; right: var(--pad); bottom: clamp(44px, 11vh, 130px); z-index: 6; width: min(340px, 30vw); transition: opacity .8s; }
.asc-page .profile.is-off { opacity: 0; pointer-events: none; }
.asc-page .cp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.asc-page .cp-row b { color: var(--blanc); font-weight: 500; }
.asc-page .pips { list-style: none; display: flex; margin: 0 -9px 0 0; padding: 0; }
.asc-page .pips button { display: grid; place-items: center; width: 26px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; }
.asc-page .pips button::before { content: ""; width: 8px; height: 8px; transform: rotate(45deg); border: 1px solid rgba(238,237,232,.4); transition: background .3s, border-color .3s, transform .3s var(--asc-ease); }
.asc-page .pips button:hover::before { border-color: var(--blanc); transform: rotate(45deg) scale(1.3); }
.asc-page .pips button.is-done::before { background: var(--fil); border-color: var(--fil); }
.asc-page .pips button.is-next::before { border-color: var(--blanc); animation: asc-pip 1.8s ease-in-out infinite; }
@keyframes asc-pip { 50% { box-shadow: 0 0 0 4px rgba(238,237,232,.14); } }
.asc-page .prof-read { display: flex; gap: 28px; margin-bottom: 12px; }
.asc-page .prof-read div { display: grid; gap: 2px; }
.asc-page .prof-read .num { font-family: var(--asc-mono); font-size: clamp(1.3rem, 2vw, 1.8rem); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.asc-page .prof-read .num small { font-size: .5em; color: var(--gris); margin-left: 4px; }
.asc-page .prof-graph { position: relative; }
.asc-page .profile svg { display: block; width: 100%; height: 74px; overflow: visible; }
.asc-page .p-area { fill: rgba(238,237,232,.05); }
.asc-page .p-base { fill: none; stroke: rgba(238,237,232,.28); stroke-width: 1; vector-effect: non-scaling-stroke; }
.asc-page .p-done { fill: none; stroke: var(--fil); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.asc-page .p-dot { fill: var(--blanc); }
.asc-page .pm { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; transform: rotate(45deg); background: var(--nuit); border: 1px solid rgba(238,237,232,.55); transition: background .3s, border-color .3s; }
.asc-page .pm.is-done { background: var(--fil); border-color: var(--fil); }
.asc-page .p-foot { display: flex; justify-content: space-between; margin: 10px 0 0; }

/* Après le sommet : les réalisations et le rendez-vous */
.asc-page .related-projects { background: var(--nuit); color: var(--blanc); }
.asc-end { padding: clamp(90px, 13vw, 190px) 0 clamp(90px, 10vw, 150px); border-top: 1px solid rgba(238,237,232,.12); }
.asc-end h2 { margin: 14px 0 26px; font-size: clamp(1.9rem, 4vw, 4.2rem); max-width: 30ch; }
.asc-end .actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

@media (max-width: 1000px) { .asc-hint { display: none; } }
@media (max-width: 860px) {
  .asc-stage::after { background: linear-gradient(0deg, rgba(14,15,15,.88) 0%, rgba(14,15,15,.2) 55%, transparent 80%); }
  .asc-page .chapter, .asc-opening { bottom: 34px; }
  .asc-page .profile { top: calc(var(--header-h, 72px) + 12px); bottom: auto; width: 190px; }
  .asc-page .profile svg { height: 40px; }
  .asc-page .prof-read { gap: 16px; }
  .asc-page .p-foot { display: none; }
  .asc-page .cp-row { flex-direction: column; align-items: flex-end; gap: 2px; margin-bottom: 8px; }
  .asc-page .cp-card { top: 34%; }
}
@media (prefers-reduced-motion: reduce) { .asc-page *, .asc-page *::before, .asc-page *::after { animation: none !important; transition-duration: .01ms !important; } }

/* Étapes à venir : estompées et floues. On devine la suite, sans qu'elle prenne le pas sur l'étape en cours. */
.asc-page .pips button:not(.is-done):not(.is-next)::before { opacity: .3; filter: blur(.7px); }
.asc-page .pm:not(.is-done):not(.is-next) { opacity: .3; filter: blur(.7px); }
.asc-page .pm.is-next { border-color: var(--blanc); box-shadow: 0 0 0 3px rgba(238,237,232,.14); }
.asc-page .p-base { stroke-dasharray: 2 3; opacity: .65; }
