/* Adirexia · couche « fluide » : transitions entre pages, apparitions, espace élève façon application. */

/* ---------- Navigation fluide entre les pages ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: adx-out .18s ease both; }
::view-transition-new(root) { animation: adx-in .28s cubic-bezier(.2,.7,.2,1) both; }
@keyframes adx-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes adx-in { from { opacity: 0; transform: translateY(10px); } }
.adx-nav { view-transition-name: adx-nav; }

.adx-loadbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000; background: linear-gradient(90deg, var(--sky), #ffb534); box-shadow: 0 0 12px rgba(0,153,255,.6); transition: width .4s ease, opacity .3s; opacity: 0; }
.adx-loadbar.run { opacity: 1; width: 75%; transition: width 6s cubic-bezier(.1,.6,.1,1); }

/* Apparition au défilement (uniquement si le script est actif) */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
a, .btn, .adx-card, .adx-row, .adx-chip { transition: all .18s ease; }
.btn:active { transform: scale(.97); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Parcours par chapitre ---------- */
.adx-chip.is-current { background: var(--navy); border-color: var(--navy); color: #fff; }
.adx-chapter { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 1.3rem 1.3rem 1.2rem; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.adx-chapter:hover { box-shadow: 0 16px 36px rgba(0,32,96,.10); transform: translateY(-2px); }
.adx-chapter.is-complete { background: linear-gradient(160deg, #f2fbf6, var(--paper)); border-color: #cfe7da; }
.adx-chapter .c-head { display: flex; justify-content: space-between; align-items: center; }
.adx-chapter .c-num { font-family: var(--serif); font-size: 2.4rem; font-weight: 700; color: var(--sky); line-height: 1; opacity: .9; }
.adx-chapter h3 { font-size: 1.12rem; color: var(--navy); margin: .8rem 0 1rem; line-height: 1.3; flex: 1; }
.c-ring, .g-ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; background: conic-gradient(var(--sky) calc(var(--p) * 1%), #e8edf5 0); display: grid; place-items: center; }
.c-ring span { width: 42px; height: 42px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: var(--navy); }
.c-steps { list-style: none; padding: 0; margin: 0; display: flex; justify-content: space-between; position: relative; }
.c-steps::before { content: ""; position: absolute; top: 13px; left: 12%; right: 12%; height: 2px; background: var(--line); }
.c-steps li { position: relative; flex: 1; text-align: center; }
.c-steps a { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-decoration: none; color: var(--ink); font-size: .78rem; font-weight: 600; }
.c-steps .dot { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--sky); display: grid; place-items: center; color: #fff; font-size: .8rem; position: relative; z-index: 1; }
.c-steps a:hover .dot { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(0,153,255,.15); }
.c-steps li.done .dot { background: #ffb534; border-color: #ffb534; }
.c-steps li.locked .dot { border-color: #c9cfdb; color: #9aa3b5; background: #f3f4f7; }
.c-steps li.locked .lbl { color: var(--muted); }
.c-done { color: var(--ok); font-weight: 700; font-size: .9rem; text-align: center; }
.adx-row.is-done .r-title { color: var(--muted); }
.r-bar { display: block; height: 3px; background: var(--line); border-radius: 3px; margin-top: .4rem; max-width: 240px; }
.r-bar i { display: block; height: 100%; background: var(--sky); border-radius: 3px; }

/* ---------- Annales : une carte par session ---------- */
.adx-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .8rem; }
.adx-year { display: flex; gap: 1rem; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; scroll-margin-top: 5rem; }
.adx-year:hover { border-color: #cdd9ee; box-shadow: 0 10px 26px rgba(0,32,96,.08); }
.adx-year:target { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(0,153,255,.18); }
.adx-year .y-num { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--navy); line-height: 1; min-width: 3.6rem; }
.adx-year .y-body { flex: 1; min-width: 0; }
.adx-year .y-title { font-size: .8rem; color: var(--muted); margin-bottom: .55rem; }
.adx-year .y-links { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.adx-year .y-soon { font-size: .78rem; color: #9aa3b5; font-style: italic; }

/* ---------- Espace élève (façon application) ---------- */
.adx-app { background: radial-gradient(900px 420px at 90% -5%, rgba(0,153,255,.45), transparent 60%), linear-gradient(170deg, #0b3db8 0%, #0a2a86 45%, #061a52 100%); color: #e9efff; flex: 1; }
.adx-app a { color: #9fd3ff; }
.app-kicker { color: #ffcf7a; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; margin-bottom: .4rem; }
.app-title { font-family: var(--serif); color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 0; }
.app-title em { color: #ffcf7a; font-weight: 500; }
.app-card { background: rgba(6, 22, 70, .55); border: 1px solid rgba(255,255,255,.10); border-radius: 22px; padding: 1.3rem 1.4rem; backdrop-filter: blur(10px); box-shadow: 0 18px 40px rgba(2, 10, 40, .35); }
.app-h2 { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 1rem; }
.app-muted { color: rgba(233,239,255,.65); }
.app-pill { background: rgba(255,181,52,.16); color: #ffcf7a; border-radius: 999px; padding: .2rem .7rem; font-size: .75rem; font-weight: 700; }
.btn-amber { background: #ffb534; color: #1d1300; border: 0; }
.adx-app a.btn-amber, .adx-app a.btn-amber:hover { color: #1d1300; }
.btn-amber:hover { background: #ffc65c; color: #1d1300; }
.app-stat { display: flex; flex-direction: column; gap: .1rem; height: 100%; }
.app-stat i { font-size: 1.3rem; color: #ffb534; margin-bottom: .3rem; }
.app-stat strong { font-family: var(--serif); font-size: 2rem; color: #fff; line-height: 1.05; font-variant-numeric: tabular-nums; }
.app-stat span { font-size: .8rem; color: rgba(233,239,255,.7); }
.app-goal { display: flex; align-items: center; gap: .9rem; padding: .75rem .4rem; border-top: 1px solid rgba(255,255,255,.08); }
.app-goal:first-of-type { border-top: 0; }
.g-ring { width: 38px; height: 38px; flex: 0 0 38px; background: conic-gradient(#ffb534 calc(var(--p) * 1%), rgba(255,255,255,.12) 0); -webkit-mask: radial-gradient(circle 13px, transparent 98%, #000); mask: radial-gradient(circle 13px, transparent 98%, #000); }
.g-body { flex: 1; min-width: 0; text-decoration: none; display: flex; flex-direction: column; }
.g-kind { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #9fd3ff; font-weight: 700; }
.g-title { color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-check { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); background: transparent; color: #fff; display: grid; place-items: center; }
.g-check:hover { background: #ffb534; border-color: #ffb534; color: #1d1300; transform: scale(1.08); }
.app-resume { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border-radius: 16px; background: rgba(255,255,255,.07); color: #fff !important; text-decoration: none; }
.app-resume:hover { background: rgba(255,255,255,.13); }
.app-resume > i:first-child { font-size: 1.8rem; color: #ffb534; }
.app-resume small { display: block; color: rgba(233,239,255,.65); font-size: .72rem; }
.app-bars { display: flex; align-items: flex-end; gap: .55rem; height: 130px; }
.app-bars .bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .35rem; }
.app-bars .bar i { display: block; width: 100%; max-width: 30px; height: max(4px, var(--h)); border-radius: 8px 8px 4px 4px; background: rgba(159,211,255,.45); transform-origin: bottom; animation: adx-grow .8s cubic-bezier(.2,.7,.2,1) both; }
.app-bars .bar.today i { background: #ffb534; }
.app-bars .bar span { font-size: .68rem; color: rgba(233,239,255,.6); }
@keyframes adx-grow { from { transform: scaleY(0); } }
.app-subject { display: grid; grid-template-columns: 1fr 90px 42px; align-items: center; gap: .8rem; padding: .6rem 0; text-decoration: none; color: #fff !important; border-top: 1px solid rgba(255,255,255,.08); }
.app-subject:first-of-type { border-top: 0; }
.app-subject .s-name { font-weight: 600; }
.app-subject small { display: block; color: rgba(233,239,255,.6); font-weight: 400; font-size: .74rem; }
.app-subject .s-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.app-subject .s-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4fb8ff, #ffb534); border-radius: 6px; }
.app-subject .s-pct { text-align: right; font-weight: 700; font-size: .85rem; }
.adx-app ~ .adx-footer { border-top-color: #ffb534; }
