/* Autres accompagnements (/autres-accompagnements/) — préfixe « aa- ».
   Sommaire en cartes, « fiche » 2 × 2 par motif (même grille partout), mini-parcours de la voie habituelle,
   arbre « tronc commun Bilan → deux branches → suivis ». Couleurs : jetons de tokens.css uniquement. */

.aa-hero .page-head__media { min-height: 520px; }
@media (max-width: 1080px) { .aa-hero .page-head__media { min-height: 0; } }

/* ─── Sommaire ─────────────────────────────────────────────────────────── */
.aa-index__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 64px; align-items: end; }
.aa-index__grid-note { display: flex; flex-direction: column; gap: 16px; }
.aa-index__grid-note > p { font-size: 1.0625rem; line-height: 1.6; color: var(--ink-2); max-width: 40em; }
.aa-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 0; padding: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--ink); }
.aa-legend li { display: inline-flex; align-items: center; gap: 8px; }
.aa-legend__num {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; border: 1.5px solid var(--teal); color: var(--teal); font-size: .75rem; line-height: 1;
}
.aa-legend__num--alert { border-color: var(--oak); color: var(--oak-ink); background: #fff; }

.aa-index__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.aa-index__list > li { display: flex; }
.aa-index__card {
  flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 22px 20px 18px;
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-l); position: relative;
}
.aa-index__icon { width: 48px; height: 48px; border-radius: var(--r-m); background: var(--tint); color: var(--teal); display: flex; align-items: center; justify-content: center; }
.aa-index__num { position: absolute; top: 20px; right: 20px; color: var(--oak-ink); }
.aa-index__title { font-size: var(--fs-card); font-weight: 800; line-height: 1.3; color: var(--ink); }
.aa-index__path { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .8125rem; font-weight: 600; color: var(--ink-3); }
.aa-dot { flex: none; width: 12px; height: 12px; border-radius: 3px; }
.aa-dot--plan { background: var(--teal); }
.aa-dot--doc { border: 1.5px dashed var(--teal); }
.aa-dot--both { background: linear-gradient(135deg, var(--teal) 50%, transparent 50%); border: 1.5px solid var(--teal); }
@media (max-width: 1080px) {
  .aa-index__head { grid-template-columns: minmax(0, 1fr); }
  .aa-index__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .aa-index__list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .aa-index__card { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 16px; }
  .aa-index__icon { grid-row: 1 / 3; }
  .aa-index__num { top: 16px; right: 16px; }
  .aa-index__title { padding-right: 28px; }
  .aa-index__path { grid-column: 2; margin-top: 0; padding-top: 0; border-top: 0; }
}

/* ─── Un motif : en-tête + fiche 2 × 2 ─────────────────────────────────── */
.aa-motif__head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 20px; align-items: center; max-width: 960px; }
.aa-motif__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--tint); color: var(--teal); display: flex; align-items: center; justify-content: center; }
.section--mist .aa-motif__icon { background: #fff; }
.aa-motif__num { color: var(--oak-ink); }
.aa-motif__more { align-self: flex-start; }

.aa-sheet {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-l); overflow: hidden;
}
.aa-sheet__cell { display: flex; flex-direction: column; gap: 16px; padding: 32px 36px; border-color: var(--line); border-style: solid; border-width: 0; }
.aa-sheet__cell:nth-child(odd) { border-right-width: 1px; }
.aa-sheet__cell:nth-child(-n+2) { border-bottom-width: 1px; }
.aa-sheet__cell > p { color: var(--ink-2); line-height: 1.65; }
.aa-sheet__label { display: flex; align-items: center; gap: 12px; font-size: 1.0625rem; font-weight: 800; line-height: 1.3; color: var(--ink); }
.aa-sheet .checklist { font-size: var(--fs-body); color: var(--ink-2); }
.aa-sheet__cell--alert { background: var(--mist); box-shadow: inset 4px 0 0 var(--oak); }
.aa-sheet__cell--alert .aa-sheet__label { color: var(--oak-ink); }
@media (max-width: 860px) {
  .aa-sheet { grid-template-columns: minmax(0, 1fr); }
  .aa-sheet__cell { border-right-width: 0 !important; border-bottom-width: 1px; }
  .aa-sheet__cell:last-child { border-bottom-width: 0; }
}
@media (max-width: 719px) { .aa-sheet__cell { padding: 24px 20px; } }

/* les trois moments (chirurgie) */
.aa-phases { display: flex; list-style: none; margin: 0; padding: 0; counter-reset: aa-ph; }
.aa-phases li {
  flex: 1; position: relative; padding: 22px 8px 0 0; font-size: var(--fs-xs); font-weight: 700; color: var(--teal-deep);
  border-top: 2px solid var(--oak); line-height: 1.35;
}
.aa-phases li::before { content: ''; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--oak); }

/* ─── Mini-parcours « voie habituelle » ────────────────────────────────── */
.aa-route { display: flex; flex-wrap: nowrap; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.aa-route > li { display: flex; align-items: center; }
.aa-route > li + li { position: relative; margin-left: 44px; }
.aa-route > li + li::before {
  content: ''; position: absolute; right: calc(100% + 5px); top: calc(50% - 6px); width: 34px; height: 12px;
  background: var(--oak-ink); clip-path: polygon(0 40%, 80% 40%, 80% 0, 100% 50%, 80% 100%, 80% 60%, 0 60%);
}
.aa-route__rdv, .aa-route__work, .aa-route__doc {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: var(--r-m);
  font-size: var(--fs-small); font-weight: 800; line-height: 1.25; color: var(--ink);
}
.aa-route .mono { font-size: .6875rem; font-weight: 500; color: var(--oak-ink); letter-spacing: .02em; white-space: nowrap; }
.aa-route__rdv { border: 2px solid var(--teal); background: #fff; }
.aa-route__work, .aa-route__doc { border: 1.5px dashed var(--line-dash-dark); background: var(--mist); }
.aa-route__doc { flex-direction: row; align-items: center; gap: 10px; }
.aa-route__doc > span { display: flex; flex-direction: column; gap: 2px; }
.aa-route__doc .icon { color: var(--teal); flex: none; }
.aa-route__fork ul[role='list'] { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--oak); }
.aa-route__or { font-size: .75rem; color: var(--ink-3); padding-left: 6px; }
.aa-route__rdv--small, .aa-route__doc--small { padding: 7px 12px; font-size: var(--fs-xs); }
.aa-route__fork { align-self: stretch; }
.aa-sheet__cell--after { container-type: inline-size; }
@container (max-width: 500px) {
  .aa-route { flex-direction: column; align-items: flex-start; }
  .aa-route > li + li { margin-left: 0; margin-top: 30px; }
  .aa-route > li + li::before { right: auto; left: 18px; top: -27px; width: 12px; height: 24px; clip-path: polygon(40% 0, 60% 0, 60% 72%, 100% 72%, 50% 100%, 0 72%, 40% 72%); }
}

/* ─── Arbre : tronc « Bilan », deux branches, jonction « suivis » ──────── */
.aa-tree { display: flex; flex-direction: column; align-items: stretch; }
.aa-tree__trunk, .aa-tree__end {
  align-self: center; width: 100%; max-width: 560px; text-align: center;
  display: flex; flex-direction: column; gap: 8px; padding: 24px 28px; border-radius: var(--r-l);
}
.aa-tree__trunk { background: #fff; border: 2px solid var(--teal); box-shadow: var(--shadow-card); }
.aa-tree__trunk p { color: var(--ink-2); font-size: var(--fs-small); line-height: 1.55; }
.aa-tree__end { max-width: 760px; background: var(--teal); color: #fff; }
.aa-tree__end p { color: var(--on-dark-2); font-size: var(--fs-small); line-height: 1.6; }
.aa-tree__end .aa-tree__tag { color: var(--oak-light); }
.aa-tree__tag { font-size: .78125rem; color: var(--oak-ink); }
.aa-tree__title { font-size: 1.5rem; font-weight: 800; line-height: 1.2; color: var(--ink); }

.aa-tree__fork, .aa-tree__join { position: relative; height: 64px; }
.aa-tree__fork-lines, .aa-tree__join-lines { position: absolute; left: 25%; right: 25%; }
.aa-tree__fork::before, .aa-tree__join::after { content: ''; position: absolute; left: calc(50% - 1px); width: 2px; height: 50%; background: var(--oak); }
.aa-tree__fork::before { top: 0; }
.aa-tree__fork-lines { top: 50%; bottom: 0; border: 2px solid var(--oak); border-bottom: 0; border-radius: 10px 10px 0 0; }
.aa-tree__join::after { bottom: 0; }
.aa-tree__join-lines { top: 0; bottom: 50%; border: 2px solid var(--oak); border-top: 0; border-radius: 0 0 10px 10px; }
.aa-tree__fork-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #fff; padding: 2px 10px; font-size: .78125rem; color: var(--oak-ink); white-space: nowrap; }

.aa-tree__branches { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); align-items: stretch; }
.aa-tree__or { align-self: center; justify-self: center; font-size: .8125rem; color: var(--oak-ink); }
.aa-tree__branch { display: flex; flex-direction: column; gap: 16px; padding: 28px; background: var(--mist); border: 1.5px solid var(--line-2); border-radius: var(--r-xl); }
.aa-tree__branch-head { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.aa-tree__badge { font-size: .78125rem; color: var(--teal-deep); background: var(--tint); border-radius: 4px; padding: 4px 8px; }
.aa-tree__branch-title { font-size: 1.25rem; font-weight: 800; line-height: 1.25; }
.aa-tree__for { font-size: .90625rem; line-height: 1.55; color: var(--ink-2); }
.aa-tree__for strong { color: var(--ink); }

.aa-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; position: relative; }
.aa-steps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; border-radius: var(--r-m); font-size: var(--fs-small); line-height: 1.6; color: var(--ink-2); position: relative; }
.aa-steps li + li::before { content: ''; position: absolute; left: 30px; top: -13px; width: 2px; height: 12px; background: var(--oak); }
.aa-steps strong { color: var(--ink); }
.aa-steps__rdv { background: #fff; border: 2px solid var(--teal); }
.aa-steps__work { border: 1.5px dashed var(--line-dash-dark); background: transparent; }
.aa-steps__num { width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .78125rem; }
.aa-steps__work .aa-steps__num { background: #fff; color: var(--teal); border: 1.5px solid var(--teal); }

.aa-legend-tree { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; list-style: none; margin: 0 0 -24px; padding: 0; font-size: var(--fs-xs); color: var(--ink-3); }
.aa-legend-tree li { display: flex; align-items: center; gap: 10px; }
.aa-legend-tree__rdv, .aa-legend-tree__work { width: 22px; height: 16px; border-radius: 4px; }
.aa-legend-tree__rdv { border: 2px solid var(--teal); background: #fff; }
.aa-legend-tree__work { border: 1.5px dashed var(--line-dash-dark); }

.aa-network { display: flex; align-items: flex-start; gap: 12px; max-width: 760px; align-self: center; font-size: var(--fs-small); line-height: 1.6; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 20px; }
.aa-network .icon { color: var(--oak-ink); flex: none; margin-top: 1px; }

@media (max-width: 860px) {
  .aa-tree__branches { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .aa-tree__or { padding: 10px 0; }
  .aa-tree__fork-lines, .aa-tree__join-lines { display: none; }
  .aa-tree__fork::before, .aa-tree__join::after { height: 100%; }
  .aa-tree__fork, .aa-tree__join { height: 56px; }
}
@media (max-width: 719px) {
  .aa-tree__branch { padding: 20px 16px; }
  .aa-tree__trunk, .aa-tree__end { padding: 20px; }
  .aa-steps li { padding: 12px; grid-template-columns: 28px minmax(0, 1fr); }
  .aa-steps li + li::before { left: 26px; }
}

@media (max-width: 719px) {
  .aa-motif__head { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: start; }
  .aa-motif__icon { width: 48px; height: 48px; }
  .aa-motif__icon .icon { width: 26px; height: 26px; }
}
