/* ============================================================
   Guide "Devenir Grutier au Québec" — thème PREMIUM glassmorphism
   Fond sombre profond + halos animés + cartes en verre dépoli
   Typographie : Sora (titres) / Inter (texte)
   ============================================================ */
:root {
  --bg0: #070b12;
  --bg1: #0c1322;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --stroke: rgba(255, 255, 255, 0.13);
  --stroke-strong: rgba(255, 255, 255, 0.22);
  --txt: #eef3fa;
  --muted: #a7b3c3;
  --gold: #ffc933;
  --gold-soft: #ffd85e;
  --amber: #ff8a3d;
  --cyan: #38d6ff;
  --radius: 22px;
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.5);
  --font-d: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-b: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 82px; }

body {
  font-family: var(--font-b);
  line-height: 1.66;
  color: var(--txt);
  background:
    radial-gradient(1100px 720px at 85% -12%, rgba(255, 201, 51, 0.13), transparent 60%),
    radial-gradient(900px 620px at -12% 28%, rgba(255, 138, 61, 0.11), transparent 55%),
    radial-gradient(820px 540px at 55% 118%, rgba(56, 214, 255, 0.07), transparent 60%),
    linear-gradient(180deg, #0d1424 0%, var(--bg0) 55%, #0a101b 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* grille fine de fond + vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.016) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.016) 0 1px, transparent 1px 42px);
  mask-image: radial-gradient(1200px 900px at 50% 0%, black 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(1200px 900px at 50% 0%, black 0%, transparent 78%);
}

/* halos flottants — plus présents pour rendre le verre visible */
.orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(74px);
  animation: drift 22s ease-in-out infinite alternate;
}
.orb-1 { width: 560px; height: 560px; top: -120px; right: -100px; background: rgba(255, 201, 51, 0.19); }
.orb-2 { width: 500px; height: 500px; bottom: -140px; left: -120px; background: rgba(255, 138, 61, 0.16); animation-delay: -8s; }
.orb-3 { width: 420px; height: 420px; top: 38%; left: 52%; background: rgba(56, 214, 255, 0.12); animation-delay: -14s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(46px, 34px) scale(1.12); }
}

/* ---------- Révélations au scroll (activées par .js) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s cubic-bezier(.16, 1, .3, 1), transform 0.8s cubic-bezier(.16, 1, .3, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal { will-change: transform, opacity; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  z-index: 1;
  padding: 76px 22px 60px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 420px at 78% 62%, rgba(255, 201, 51, 0.16), transparent 62%),
    radial-gradient(520px 300px at 88% 22%, rgba(255, 138, 61, 0.14), transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 201, 51, 0.55), transparent);
}
.hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 40px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(160deg, rgba(255, 201, 51, 0.16), rgba(255, 138, 61, 0.08));
  border: 1px solid rgba(255, 201, 51, 0.4);
  color: var(--gold-soft);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 34px rgba(255, 201, 51, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.hero h1 {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4.3rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 22px 0 16px;
}
.hl {
  background: linear-gradient(95deg, var(--gold) 10%, var(--amber) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 24px rgba(255, 201, 51, 0.28));
}
.hero-sub {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.06rem;
}
.hero-sub strong { color: var(--txt); }
.hero-chips { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--txt);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.chip:hover {
  border-color: rgba(255, 201, 51, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 201, 51, 0.14);
}
.hero-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  color: #171206;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  box-shadow: 0 12px 34px rgba(255, 186, 58, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.25s, box-shadow 0.25s;
}
.btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -70%;
  width: 50%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-22deg);
  transition: left 0.55s ease;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(255, 186, 58, 0.5); }
.btn:hover::after { left: 130%; }
.btn.ghost {
  background: var(--glass-strong);
  border: 1px solid var(--stroke-strong);
  color: var(--txt);
  box-shadow: none;
  backdrop-filter: blur(12px);
}
.btn.ghost:hover { border-color: rgba(255, 201, 51, 0.55); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }

/* art : grue */
.hero-art { display: flex; justify-content: center; }
.crane { width: min(400px, 92%); height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5)); }
.boom { transform-origin: 151px 58px; animation: swing 7s ease-in-out infinite alternate; }
@keyframes swing { from { transform: rotate(-2deg); } to { transform: rotate(2.4deg); } }
.hookline { animation: hoist 5.5s ease-in-out infinite; }
@keyframes hoist { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* ---------- SOMMAIRE sticky glass ---------- */
.toc {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(8, 12, 20, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--stroke);
  padding: 10px 16px;
}
.toc ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: center;
  max-width: 1040px;
  margin: 0 auto;
}
.toc a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 5px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.toc a:hover { color: var(--txt); }
.toc a.active { color: var(--gold); border-bottom-color: var(--gold); }
.toc-toggle { display: none; }

/* ---------- CONTENU ---------- */
.content {
  position: relative;
  z-index: 1;
  max-width: 1020px;
  margin: 0 auto;
  padding: 40px 18px 70px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.card {
  position: relative;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.028) 45%, rgba(255, 255, 255, 0.015));
  border: 1px solid var(--stroke);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  padding: 30px 30px 32px;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.card:hover { transform: translateY(-3px); }
/* reflet en haut à gauche */
.card::before {
  content: "";
  position: absolute;
  top: -90px; left: -90px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 51, 0.10), transparent 65%);
  pointer-events: none;
}
.card:hover { border-color: rgba(255, 201, 51, 0.28); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 0 46px rgba(255, 201, 51, 0.07); }

.kicker {
  display: inline-block;
  font-family: var(--font-d);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(255, 201, 51, 0.1);
  border: 1px solid rgba(255, 201, 51, 0.3);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.card h2 {
  font-family: var(--font-d);
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  position: relative;
}
.card h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 74px; height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--amber));
}
.card h3 {
  font-family: var(--font-d);
  font-size: 1.06rem;
  margin: 22px 0 10px;
}
.card p { color: var(--txt); margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }
.card em { color: var(--gold-soft); font-style: italic; }
.card a {
  color: var(--gold-soft);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 201, 51, 0.35);
  transition: border-color 0.2s;
}
.card a:hover { border-bottom-color: var(--gold); }

ul.missions, .card ul { padding-left: 0; list-style: none; }
.card ul li {
  padding-left: 4px;
  margin-bottom: 8px;
}
.card ul li::before {
  content: "▸";
  color: var(--gold);
  margin-right: 9px;
  font-weight: 700;
}

/* ---------- Qualités ---------- */
.grid-qualities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 13px;
  margin-bottom: 14px;
}
.q-item {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 13px 15px;
  font-size: 0.9rem;
  color: var(--muted);
  backdrop-filter: blur(8px);
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.q-item:hover { transform: translateY(-3px); border-color: rgba(255, 201, 51, 0.4); background: rgba(255, 255, 255, 0.075); }
.q-item strong { color: var(--txt); }

/* ---------- Parcours ---------- */
.parcours-block {
  background: var(--glass);
  border-left: 3px solid var(--gold);
  border-radius: 0 14px 14px 0;
  padding: 15px 19px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
}
.parcours-block h3 { margin-top: 0; }

/* ---------- ASP / CCQ ---------- */
.caces-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 13px;
  margin-bottom: 14px;
}
.caces-item {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 15px 17px;
  backdrop-filter: blur(8px);
}
.caces-item.highlight {
  border-color: rgba(255, 201, 51, 0.55);
  background: linear-gradient(160deg, rgba(255, 201, 51, 0.12), rgba(255, 201, 51, 0.03));
}
.caces-item h3 { margin-top: 0; font-size: 0.98rem; }
.tag {
  display: inline-block;
  background: linear-gradient(120deg, var(--gold), var(--amber));
  color: #171206;
  font-size: 0.66rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 2px 9px;
  vertical-align: middle;
  margin-left: 4px;
  box-shadow: 0 3px 12px rgba(255, 186, 58, 0.4);
}

/* ---------- Tableau salaires ---------- */
.table-wrap {
  overflow-x: auto;
  margin: 14px 0;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.18);
}
.salary-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 540px; }
.salary-table th {
  background: linear-gradient(120deg, rgba(255, 201, 51, 0.16), rgba(255, 138, 61, 0.1));
  color: var(--gold-soft);
  text-align: left;
  padding: 11px 13px;
  font-size: 0.78rem;
  font-family: var(--font-d);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.salary-table td { padding: 11px 13px; border-top: 1px solid var(--stroke); color: var(--txt); font-variant-numeric: tabular-nums; }
.salary-table tbody tr { transition: background 0.2s; }
.salary-table tbody tr:hover { background: rgba(255, 201, 51, 0.05); }
.salary-table tbody tr:nth-child(3) td { color: var(--gold-soft); font-weight: 700; }

/* ---------- Liens ---------- */
.links li { margin-bottom: 10px; }
.links .desc { color: var(--muted); font-size: 0.84rem; }

/* ---------- Notes ---------- */
.note {
  background: linear-gradient(160deg, rgba(56, 214, 255, 0.09), rgba(56, 214, 255, 0.03));
  border: 1px solid rgba(56, 214, 255, 0.28);
  border-radius: 13px;
  padding: 11px 15px;
  font-size: 0.89rem;
  margin-top: 14px;
}

/* ---------- PLAYER VIDÉO ---------- */
.video-section {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 10px;
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 201, 51, 0.3);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 44px rgba(255, 201, 51, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  background: #000;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-meta { margin-top: 14px; }
.video-tag {
  display: inline-block;
  background: linear-gradient(120deg, var(--gold), var(--amber));
  color: #171206;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 3px 11px;
  margin-bottom: 8px;
}
.video-meta h3 {
  font-family: var(--font-d);
  font-size: 1.1rem;
  margin: 0 0 6px;
}
.video-desc { color: var(--muted); font-size: 0.88rem; margin: 0; }
.video-playlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 4px;
}
.vitem {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.22s, border-color 0.22s, background 0.22s;
}
.vitem:hover { transform: translateX(4px); border-color: rgba(255, 201, 51, 0.45); }
.vitem.active {
  border-color: rgba(255, 201, 51, 0.65);
  background: linear-gradient(100deg, rgba(255, 201, 51, 0.16), rgba(255, 201, 51, 0.03));
  box-shadow: 0 6px 20px rgba(255, 201, 51, 0.12);
}
.vitem img {
  width: 118px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--stroke);
  flex-shrink: 0;
}
.vitem-body { min-width: 0; }
.vitem-title {
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--txt);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vitem-sub { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }

/* scrollbar playlist */
.video-playlist::-webkit-scrollbar { width: 8px; }
.video-playlist::-webkit-scrollbar-thumb { background: rgba(255, 201, 51, 0.3); border-radius: 8px; }
.video-playlist::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 8px; }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--stroke);
  border-radius: 13px;
  padding: 0 17px;
  margin-bottom: 11px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s;
}
.faq details[open] { border-color: rgba(255, 201, 51, 0.42); }
.faq summary {
  cursor: pointer;
  padding: 13px 0;
  font-weight: 700;
  font-family: var(--font-d);
  font-size: 0.95rem;
  color: var(--txt);
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px; top: 10px;
  color: var(--gold);
  font-size: 1.3rem;
  transition: transform 0.25s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 15px; color: var(--muted); }

/* ============================================================
   COMPAGNON — plan interactif (étapes, notes, historique)
   ============================================================ */
.comp-shell { margin-top: 22px; display: flex; flex-direction: column; gap: 20px; }

/* carte intérieure (notes) */
.card-inner {
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 18px 20px;
}

/* --- bandeau de status / progression --- */
.comp-status {
  display: flex;
  gap: 22px;
  align-items: center;
  background: linear-gradient(145deg, rgba(255, 201, 51, 0.10), rgba(255, 138, 61, 0.03));
  border: 1px solid rgba(255, 201, 51, 0.3);
  border-radius: 18px;
  padding: 18px 22px;
  flex-wrap: wrap;
}
.comp-ring {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--gold) calc(var(--p, 0) * 1%), rgba(255, 255, 255, 0.08) 0);
  position: relative;
  flex-shrink: 0;
}
.comp-ring::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #0b101c;
}
.comp-ring-num {
  position: relative;
  z-index: 1;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--gold-soft);
}
.comp-status-info { flex: 1; min-width: 240px; }
.comp-bar {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--stroke);
  overflow: hidden;
}
.comp-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--amber));
  box-shadow: 0 0 16px rgba(255, 186, 58, 0.55);
  transition: width 0.6s cubic-bezier(.16, 1, .3, 1);
}
.comp-done { margin-top: 9px; font-size: 0.84rem; color: var(--muted); font-weight: 600; }
.comp-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

/* boutons micro */
.btn.micro {
  padding: 8px 15px;
  font-size: 0.78rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(255, 186, 58, 0.25);
}
.btn.micro:not(.ghost) { color: #171206; }
.btn.micro.danger {
  background: rgba(255, 93, 93, 0.12);
  border: 1px solid rgba(255, 93, 93, 0.4);
  color: #ff8f8f;
  box-shadow: none;
}
.btn.micro.danger:hover { background: rgba(255, 93, 93, 0.2); }

/* --- étapes --- */
.journey { display: flex; flex-direction: column; gap: 14px; }
.jstep {
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.jstep.done { border-color: rgba(76, 217, 100, 0.4); }
.jstep.done .jstep-header { background: linear-gradient(120deg, rgba(76, 217, 100, 0.09), rgba(76, 217, 100, 0.02)); }
.jstep.open { border-color: rgba(255, 201, 51, 0.5); }
.jstep-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  cursor: pointer;
  user-select: none;
}
.jstep-header:hover { background: rgba(255, 255, 255, 0.05); }
.jstep-num {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 0.95rem;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #171206;
  box-shadow: 0 5px 16px rgba(255, 186, 58, 0.35);
}
.jstep.done .jstep-num { background: linear-gradient(135deg, #4cd964, #2ba94c); color: #05120a; box-shadow: 0 5px 16px rgba(76, 217, 100, 0.3); }
.jstep-title { flex: 1; min-width: 0; }
.jstep-title h3 { margin: 0; font-size: 1.02rem; font-family: var(--font-d); }
.jstep-duration { font-size: 0.78rem; color: var(--muted); }
.jstep-duration .jstep-counter { color: var(--gold-soft); font-weight: 700; }
.jstep-state {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(255, 201, 51, 0.14);
  border: 1px solid rgba(255, 201, 51, 0.3);
  white-space: nowrap;
}
.jstep.done .jstep-state { color: #7dffa0; background: rgba(76, 217, 100, 0.12); border-color: rgba(76, 217, 100, 0.35); }
.jstep-chev { color: var(--muted); transition: transform 0.3s; font-size: 0.8rem; }
.jstep.open .jstep-chev { transform: rotate(180deg); }

.jstep-body {
  display: none;
  padding: 6px 18px 20px;
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
}
.jstep.open .jstep-body { display: block; }

.task-list { list-style: none; padding: 0; padding-top: 14px; }
.task-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 7px 4px;
  border-radius: 9px;
  font-size: 0.9rem;
  color: var(--txt);
}
.task-list li:hover { background: rgba(255, 255, 255, 0.04); }
.task-list input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  margin-top: 1px;
  border-radius: 7px;
  border: 2px solid var(--stroke-strong);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.task-list input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #4cd964, #2ba94c);
  border-color: #4cd964;
}
.task-list input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #05120a;
  font-size: 0.78rem;
  font-weight: 900;
}
.task-list li.done span { text-decoration: line-through; color: var(--muted); }

/* --- notes --- */
.note-box { margin: 14px 0 6px; }
.note-box label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-soft);
  margin-bottom: 7px;
}
.note-box textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.22);
  color: var(--txt);
  font-family: var(--font-b);
  font-size: 0.88rem;
  line-height: 1.5;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.note-box textarea:focus {
  border-color: rgba(255, 201, 51, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 201, 51, 0.12);
}
.note-box textarea::placeholder { color: #6c7886; }
.jstep-actions { display: flex; align-items: center; gap: 12px; margin-top: 9px; }
.note-saved { opacity: 0; color: #7dffa0; font-size: 0.8rem; font-weight: 600; transition: opacity 0.3s; }
.note-saved.show { opacity: 1; }
.jstep-body > .btn.micro { margin-top: 14px; }

/* --- historique / journal --- */
.comp-journal h3 { margin: 0 0 12px; font-family: var(--font-d); }
.journal { list-style: none; padding: 0; max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; }
.journal::-webkit-scrollbar { width: 8px; }
.journal::-webkit-scrollbar-thumb { background: rgba(255, 201, 51, 0.3); border-radius: 8px; }
.journal li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 0.85rem;
  color: var(--txt);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 8px 12px;
}
.journal time {
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.journal li.empty { justify-content: center; color: var(--muted); border-style: dashed; }

/* responsive compagnon */
@media (max-width: 640px) {
  .comp-status { flex-direction: column; align-items: flex-start; }
  .jstep-header { flex-wrap: wrap; gap: 10px; }
  .jstep-state { order: 3; }
}

.step-refs {
  margin: 12px 0 4px;
  padding: 10px 13px;
  border-radius: 11px;
  background: rgba(56, 214, 255, 0.06);
  border: 1px dashed rgba(56, 214, 255, 0.3);
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  align-items: center;
  font-size: 0.85rem;
}
.step-refs-label { color: var(--cyan); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.03em; }
.card .st-ref, .st-ref {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
  color: var(--txt) !important;
  border-bottom: 1px solid var(--stroke) !important;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.card .st-ref:hover, .st-ref:hover {
  border-color: rgba(56, 214, 255, 0.55);
  background: rgba(56, 214, 255, 0.1);
  transform: translateY(-1px);
}

/* bouton hero plan avec progression */
#heroPlanCta.has-progress {
  border: 1px solid rgba(255, 201, 51, 0.55);
  box-shadow: 0 0 22px rgba(255, 201, 51, 0.3), 0 12px 34px rgba(255, 186, 58, 0.38);
}
.hero-cta .btn:nth-child(2) { /* le CTA plan reste distinct */
  background: linear-gradient(135deg, #ffb400, #ff7a1a);
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 36px 18px 42px;
  border-top: 1px solid var(--stroke);
  background: rgba(8, 12, 20, 0.4);
  backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: 0.92rem;
}
.foot-small { font-size: 0.78rem; margin-top: 8px; color: #6c7886; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 26px; text-align: center; }
  .hero-sub { margin: 0 auto; }
  .hero-chips, .hero-cta { justify-content: center; }
  .hero-art { order: -1; }
  .crane { width: min(260px, 70vw); }
  .video-section { grid-template-columns: 1fr; }
  .video-playlist { max-height: none; flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .vitem { flex: 0 0 300px; }
}
@media (max-width: 640px) {
  .toc { padding: 6px 12px; }
  .toc-toggle {
    display: block;
    width: 100%;
    background: rgba(255, 201, 51, 0.12);
    border: 1px solid rgba(255, 201, 51, 0.4);
    color: var(--gold-soft);
    border-radius: 10px;
    padding: 9px;
    font-weight: 700;
    font-family: var(--font-d);
    cursor: pointer;
  }
  .toc ul {
    display: none;
    flex-direction: column;
    gap: 0;
    padding-top: 8px;
  }
  .toc ul.open { display: flex; }
  .toc a { white-space: normal; padding: 6px 4px; border-bottom: none; }
  .card { padding: 22px 18px; }
  .hero { padding: 54px 16px 46px; }
  .hero h1 { font-size: clamp(2.1rem, 9vw, 2.9rem); }
  .vitem { flex: 0 0 260px; }
  .vitem img { width: 100px; }
}
