.yrm {
  --yrm-surface: #fff; --yrm-surface-2: #f0eef9; --yrm-line: #e4e0f1; --yrm-fg: #16141f; --yrm-muted: #5f5b74;
  --yrm-accent: #7c4ddf; --yrm-done: #138a5e;
  --yrm-shadow: 0 1px 2px rgba(40,25,90,.06), 0 18px 40px -18px rgba(60,35,140,.28);
  color: var(--yrm-fg); line-height: 1.6; text-align: left;
}
.yrm, .yrm *, .yrm *::before, .yrm *::after { box-sizing: border-box; }
.yrm p { margin: 0; }
.yrm-card { background: var(--yrm-surface); border: 1px solid var(--yrm-line); border-radius: 28px; box-shadow: var(--yrm-shadow); padding: clamp(12px, 2vw, 24px) clamp(16px, 3vw, 36px); }
.yrm-period { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 8px 24px; align-items: start; padding-block: 22px; border-top: 1px solid var(--yrm-line); }
.yrm-period:first-child { border-top: 0; }
.yrm-label { display: grid; gap: 4px; align-content: start; padding-top: 4px; }
.yrm-label b { font-family: var(--font-head, inherit); font-size: 22px; line-height: 1.1; color: var(--c); }
.yrm-label span { font-size: 13px; color: var(--yrm-muted); }
.yrm-t-green { --c: #138a5e; }
.yrm-t-violet { --c: #8b5cf6; }
.yrm-t-blue { --c: #2f5fb3; }
.yrm-t-indigo { --c: #5a49c9; }
.yrm-t-grey { --c: #8d89a3; }
.yrm-nodes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 8px; }
.yrm-node { position: relative; text-align: center; padding: 34px 0 0; margin: 0; }
.yrm-node::before { content: ""; position: absolute; top: 11px; left: 0; right: 0; height: 4px; background: var(--c); }
.yrm-node.yrm-first::before { left: 50%; }
.yrm-node.yrm-last::before { right: 50%; }
.yrm-node.yrm-first.yrm-last::before { display: none; }
.yrm-dashed .yrm-node::before, .yrm-node.yrm-dash::before { background: repeating-linear-gradient(90deg, var(--c) 0 10px, transparent 10px 20px); }
.yrm-dot { position: absolute; top: 3px; left: 50%; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--yrm-surface); border: 4px solid var(--c); transition: transform .15s; }
/* Formes : losange et carré (le rond reste la forme par défaut) */
.yrm-s-square .yrm-dot { border-radius: 5px; }
.yrm-s-diamond .yrm-dot { width: 19px; height: 19px; top: 4px; margin-left: -9.5px; border-radius: 4px; transform: rotate(45deg); }
.yrm-s-diamond:hover .yrm-dot, .yrm-s-diamond:focus-within .yrm-dot, .yrm-s-diamond.yrm-open .yrm-dot { transform: rotate(45deg) scale(1.25); }
.yrm-s-diamond.yrm-ok .yrm-dot::after { transform: none; left: 4.5px; top: 1px; }
/* Fait : rond vert avec une coche, quelle que soit la couleur de sa liste */
.yrm-ok .yrm-dot { background: var(--yrm-done); border-color: var(--yrm-done); }
.yrm-ok .yrm-dot::after { content: ""; position: absolute; left: 3px; top: -.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.yrm-node > button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 6px 6px 10px; cursor: pointer; border-radius: 14px; }
.yrm-node > button:focus-visible { outline: 2px solid var(--yrm-accent); outline-offset: 2px; }
.yrm-name { display: block; font-family: var(--font-head, inherit); font-weight: 700; font-size: 15px; line-height: 1.2; text-wrap: balance; }
.yrm-node:hover .yrm-dot, .yrm-node:focus-within .yrm-dot, .yrm-node.yrm-open .yrm-dot { transform: scale(1.25); }
.yrm-node:hover .yrm-name, .yrm-node.yrm-open .yrm-name { color: var(--yrm-accent); }
.yrm-tip { position: absolute; z-index: 5; bottom: calc(100% - 6px); left: 50%; width: 270px; margin-left: -135px; transform: translateY(6px); opacity: 0; visibility: hidden; pointer-events: none; background: #1a1230; color: #f4f2fa; border-radius: 16px; padding: 16px 18px; text-align: left; box-shadow: 0 22px 50px rgba(30,15,70,.35); transition: opacity .15s, transform .15s, visibility .15s; }
.yrm-tip::after { content: ""; position: absolute; top: 100%; left: calc(50% - var(--shift, 0px)); margin-left: -8px; border: 8px solid transparent; border-top-color: #1a1230; }
.yrm-node:hover .yrm-tip, .yrm-node:focus-within .yrm-tip, .yrm-node.yrm-open .yrm-tip { opacity: 1; visibility: visible; transform: none; }
.yrm-tip b { display: block; font-family: var(--font-head, inherit); font-size: 16px; margin-bottom: 4px; color: #fff; }
.yrm-tip p { font-size: 14px; color: #d8d0ef; line-height: 1.5; }
.yrm-tip .yrm-st { display: inline-block; margin-bottom: 8px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.14); color: #fff; }
.yrm-hint { margin: 6px 0 0; text-align: center; color: var(--yrm-muted); font-size: 14px; padding-top: 14px; border-top: 1px solid var(--yrm-line); }

@media (min-width: 821px) and (max-width: 1100px) {
  .yrm-nodes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .yrm-period { grid-template-columns: 1fr; padding-block: 18px; }
  .yrm-label { grid-template-columns: auto 1fr; align-items: baseline; gap: 10px; }
  .yrm-nodes { grid-template-columns: 1fr; gap: 6px; padding-left: 8px; }
  .yrm-node { text-align: left; padding: 0 0 0 44px; }
  .yrm-node::before, .yrm-node.yrm-first::before, .yrm-node.yrm-last::before { top: 0; bottom: 0; left: 17px; right: auto; width: 4px; height: auto; }
  .yrm-node.yrm-first::before { top: 22px; }
  .yrm-node.yrm-last::before { bottom: auto; height: 22px; }
  .yrm-node.yrm-first.yrm-last::before { display: none; }
  .yrm-dashed .yrm-node::before, .yrm-node.yrm-dash::before { background: repeating-linear-gradient(180deg, var(--c) 0 10px, transparent 10px 20px); }
  .yrm-dot { top: 14px; left: 8px; margin-left: 0; }
  .yrm-s-diamond .yrm-dot { top: 16px; left: 10px; margin-left: 0; }
  .yrm-node > button { padding: 10px 6px; cursor: default; }
  .yrm-name { font-size: 16px; }
  .yrm-tip { position: static; width: auto; margin: 6px 0 0 !important; transform: none; opacity: 1; visibility: visible; pointer-events: auto; background: var(--yrm-surface-2); color: var(--yrm-fg); box-shadow: none; padding: 12px 14px; }
  .yrm-tip::after { display: none; }
  .yrm-tip b { color: var(--yrm-fg); }
  .yrm-tip p { color: var(--yrm-muted); }
  .yrm-tip .yrm-st { background: #ede7fd; color: var(--yrm-accent); }
  .yrm-hint { display: none; }
}
