/* Les tutos : index (page-tutos.php) et pas-à-pas (page-tuto.php).
   Langage du miroir : chaque étape est un petit miroir rond numéroté posé sur
   l'axe central, le texte en colonne centrée dessous ; la croix de l'oracle en
   cinq miroirs ovales ; le bilan du carnet dans un miroir rond.
   Jetons du thème seulement ; rayons toujours par --rad: var(--r-...).
   Contrastes (thème) : encre 14,2:1 et gris 6,9:1 sur perle, 7,4:1 sur nacre ;
   rose foncé #9A5446 en texte 5,1:1 sur perle, 4,9:1 sur rose pâle #F6ECE9 ;
   rose poudre jamais en texte. */

/* ---------- Ouverture ---------- */
.pas-ouv { position: relative; padding: calc(var(--cadre-h) + clamp(1rem, 3svh, 2rem)) var(--gout) clamp(3rem, 6vw, 4.5rem); text-align: center; overflow: clip; }
.pas-ouv::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(42% 52% at 50% 40%, var(--blanc) 0%, rgb(251 250 248 / 0.8) 40%, rgb(244 243 241 / 0) 72%); }
.pas-t { margin: 0.8rem auto 0; max-width: 22ch; font-family: var(--f-titre); font-weight: 300; font-size: clamp(2rem, 1.4rem + 1.8vw, 3rem); line-height: 1.06; letter-spacing: -0.02em; }
.pas-t em { font-style: italic; }
.pas-chapo { margin: 1rem auto 0; max-width: 36em; color: var(--gris); }

.pas-fiche { margin: clamp(2rem, 4svh, 2.8rem) auto 0; max-width: 52rem; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: clamp(1.6rem, 4vw, 3.5rem); }
.pas-fiche__aile { display: grid; gap: 0.35rem; max-width: 15rem; }
.pas-fiche__aile--g { justify-self: end; justify-items: end; text-align: right; }
.pas-fiche__aile--d { justify-self: start; justify-items: start; text-align: left; }
.pas-fiche dt { font-size: var(--t-xs); color: var(--gris); }
.pas-fiche__aile dd { font-family: var(--f-titre); font-size: var(--t-ms); line-height: 1.3; }
.pas-fiche__aile--g::after, .pas-fiche__aile--d::before { content: ''; display: block; width: 3rem; height: 1px; background: var(--argent-f); }
.pas-fiche__aile--g::after { margin-top: 0.7rem; }
.pas-fiche__aile--d::before { margin-bottom: 0.7rem; grid-row: 1; }
.pas-sceau .m { --w: clamp(7.5rem, 10vw, 9.25rem); }
.pas-sceau__txt { position: relative; z-index: 3; display: grid; place-content: center; justify-items: center; line-height: 1; }
.pas-sceau__txt b { font-family: var(--f-titre); font-weight: 300; font-size: var(--t-xl); letter-spacing: -0.03em; }
.pas-sceau__txt span { margin-top: 0.25rem; font-size: var(--t-xs); color: var(--gris); }

.pas-materiel { margin: clamp(2rem, 4vw, 2.8rem) auto 0; max-width: 46rem; display: grid; justify-items: center; gap: 0.8rem; }
.pas-materiel__t { font-size: var(--t-xs); color: var(--gris); font-weight: 400; }
.pas-materiel__liste { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.45rem 0.55rem; }
.pas-materiel__liste li { --rad: var(--r-pilule); padding: 0.45rem 0.95rem; border: 1px solid var(--argent); border-radius: var(--rad); background: var(--nacre); font-size: var(--t-s); }
.pas-avant { margin: 1.6rem auto 0; max-width: 34em; font-size: var(--t-s); color: var(--gris); }
.pas-avant::before { content: ''; display: block; width: 3rem; height: 1px; margin: 0 auto 1rem; background: var(--rose-f); }

/* ---------- La croix de l'oracle ---------- */
.pas-croix { padding: var(--sec) var(--gout); background: var(--nacre); border-block: 1px solid var(--filet); }
.pas-croix__plan {
  margin: clamp(2.5rem, 4.5vw, 3.5rem) auto 0; width: fit-content; max-width: 100%;
  display: grid; grid-template-columns: repeat(3, minmax(0, auto)); grid-template-areas: ". haut ." "gauche centre droite" ". bas .";
  justify-items: center; align-items: center; gap: clamp(1rem, 2.4vw, 2rem) clamp(1.4rem, 4vw, 3.5rem);
}
.pas-carte { position: relative; display: grid; justify-items: center; gap: 0.8rem; text-align: center; width: clamp(8rem, 13vw, 10.5rem); }
.pas-carte--haut { grid-area: haut; } .pas-carte--bas { grid-area: bas; } .pas-carte--gauche { grid-area: gauche; } .pas-carte--droite { grid-area: droite; } .pas-carte--centre { grid-area: centre; }
/* Pile : le miroir et son numéro dans la même case de grille. */
.pas-carte__lame, .pas-sceau, .pas-bilan, .pas-etape__miroir { display: grid; place-items: center; }
.pas-carte__lame > *, .pas-sceau > *, .pas-bilan > *, .pas-etape__miroir > * { grid-area: 1 / 1; }
.pas-carte__lame .m { --w: clamp(5.5rem, 8vw, 7rem); }
.pas-carte--centre .pas-carte__lame .m { --w: clamp(6.5rem, 10vw, 8.75rem); }
.pas-carte__n { position: relative; z-index: 3; font-family: var(--f-titre); font-weight: 300; font-size: var(--t-xl); line-height: 1; }
.pas-carte--centre .pas-carte__n { color: var(--rose-f); font-style: italic; }
.pas-carte__nom { font-family: var(--f-titre); font-size: var(--t-ms); line-height: 1.25; }
.pas-carte--centre .pas-carte__nom { font-style: italic; }

/* ---------- Les étapes : des miroirs sur l'axe ---------- */
.pas-etapes { padding: var(--sec) var(--gout) 0; }
.pas-axe { position: relative; margin: clamp(2.5rem, 4.5vw, 3.5rem) auto 0; max-width: var(--lecture); display: grid; gap: 1.1rem; }
/* L'axe : un trait d'argent qui relie chaque miroir au précédent. */
.pas-etape + .pas-etape::before { content: ''; display: block; width: 1px; height: clamp(2.6rem, 4.5vw, 3.6rem); margin-bottom: 0.2rem; background: linear-gradient(to bottom, transparent, var(--argent)); }
.pas-etape { position: relative; display: grid; justify-items: center; gap: 1.1rem; }
.pas-etape__miroir { position: relative; }
.pas-etape__miroir .m { --w: clamp(4.25rem, 5.5vw, 5rem); }
.pas-etape__n { position: relative; z-index: 3; font-family: var(--f-titre); font-weight: 300; font-size: var(--t-l); line-height: 1; }
.pas-etape__corps { position: relative; width: 100%; padding-inline: clamp(0.4rem, 2vw, 1rem); text-align: center; }
.pas-etape__t { font-family: var(--f-titre); font-weight: 400; font-size: var(--t-m); line-height: 1.2; letter-spacing: -0.008em; }
.pas-etape__txt { margin: 0.7rem auto 0; max-width: 34em; text-align: left; }
.pas-gare { --rad: var(--r-vif); margin: 1.1rem auto 0; max-width: 34em; padding: 0.9rem 1.1rem; border: 1px solid var(--rose); border-radius: var(--rad); background: var(--rose-pale); font-size: var(--t-s); line-height: 1.5; text-align: left; }
.pas-gare__t { display: block; margin-bottom: 0.25rem; color: var(--rose-f); font-weight: 500; font-size: var(--t-xs); }

/* ---------- Le carnet des heures miroirs ---------- */
.pas-carnet { padding: var(--sec) var(--gout); background: var(--nacre); border-block: 1px solid var(--filet); text-align: center; }
.pas-carnet__table { --rad: var(--r-vif); margin: clamp(2.2rem, 4vw, 3rem) auto 0; max-width: 46rem; overflow-x: auto; border: 1px solid var(--argent); border-radius: var(--rad); background: var(--blanc); box-shadow: 0 0 0 6px var(--nacre), 0 0 0 7px rgb(200 204 209 / 0.55); }
.pas-carnet table { width: 100%; border-collapse: collapse; font-size: var(--t-s); font-variant-numeric: tabular-nums; }
.pas-carnet th, .pas-carnet td { padding: 0.55rem 0.5rem; text-align: center; }
.pas-carnet thead th { font-size: var(--t-xs); font-weight: 500; color: var(--gris); line-height: 1.25; vertical-align: bottom; border-bottom: 1px solid var(--argent); }
.pas-carnet tbody tr + tr { border-top: 1px solid var(--filet); }
.pas-carnet tbody th { font-weight: 400; white-space: nowrap; }
.pas-carnet tfoot { border-top: 1px solid var(--encre); }
.pas-carnet tfoot th, .pas-carnet tfoot td { font-family: var(--f-titre); font-size: var(--t-ms); font-weight: 400; }
.pas-carnet input { --rad: var(--r-vif); width: 4rem; max-width: 100%; padding: 0.4rem 0.3rem; border: 1px solid var(--argent-f); border-radius: var(--rad); background: var(--nacre); text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.pas-carnet input::-webkit-outer-spin-button, .pas-carnet input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pas-carnet input:focus { outline: none; border-color: var(--encre); }
.pas-carnet input:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }
.pas-carnet__att { color: var(--gris); }
.pas-court { display: none; }

.pas-bilan { position: relative; margin: clamp(2.8rem, 5vw, 3.8rem) auto 0; width: fit-content; }
.pas-bilan__miroir { --w: clamp(13rem, 20vw, 16.5rem); }
.pas-bilan__dedans { position: relative; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 0.4rem; padding: 2rem; }
.pas-bilan__petit { font-size: var(--t-xs); color: var(--gris); }
.pas-bilan__chiffres { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0.1rem 0.4rem; font-size: var(--t-xs); color: var(--gris); }
.pas-bilan__chiffres output { font-family: var(--f-titre); font-weight: 300; font-size: var(--t-xl); line-height: 1; color: var(--encre); letter-spacing: -0.02em; }
.pas-bilan__sep { flex-basis: 100%; height: 0; overflow: hidden; }
.pas-bilan__lecture { margin: 1.6rem auto 0; max-width: 34em; }
.pas-carnet__actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.8rem 1.4rem; }
.pas-carnet__vider { min-height: 2.75rem; font-size: var(--t-s); color: var(--gris); text-decoration: underline 1px; text-underline-offset: 0.25em; }
.pas-carnet__note { margin-top: 0.9rem; font-size: var(--t-xs); color: var(--gris); }

/* ---------- Vérification finale ---------- */
.pas-verif { padding: var(--sec) var(--gout) 0; }
.pas-verif__cadre {
  --rad: var(--r-vif);
  margin: 0 auto; max-width: 40rem; padding: clamp(2rem, 4vw, 2.8rem) clamp(1.2rem, 4vw, 2.6rem);
  display: grid; justify-items: center; gap: 1.4rem; text-align: center;
  border: 1px solid var(--argent); border-radius: var(--rad); background: radial-gradient(80% 70% at 50% 15%, var(--blanc), var(--nacre));
  box-shadow: 0 0 0 7px var(--perle), 0 0 0 8px rgb(200 204 209 / 0.55);
}
.pas-verif__t { font-family: var(--f-titre); font-style: italic; font-weight: 300; font-size: var(--t-l); line-height: 1.15; }
.pas-verif__liste { display: grid; gap: 0.8rem; text-align: left; }
.pas-verif__liste li { position: relative; padding-left: 2rem; }
.pas-verif__liste li::before { --rad: var(--r-rond); content: ''; position: absolute; left: 0; top: 0.1em; width: 1.2rem; height: 1.2rem; border: 1px solid var(--rose-f); border-radius: var(--rad); }
.pas-verif__liste li::after { content: ''; position: absolute; left: 0.42rem; top: 0.33em; width: 0.32rem; height: 0.6rem; border: solid var(--rose-f); border-width: 0 1.5px 1.5px 0; rotate: 40deg; }

/* ---------- Encart honnête ---------- */
.pas-honnete { padding: var(--sec) var(--gout) 0; margin: 0 auto; max-width: calc(var(--lecture) + 2 * var(--gout)); text-align: center; }
.pas-honnete__t { font-family: var(--f-titre); font-weight: 300; font-size: var(--t-l); line-height: 1.12; }
.pas-honnete__t::before { content: ''; display: block; width: 1px; height: 2.4rem; margin: 0 auto 1.2rem; background: linear-gradient(to bottom, transparent, var(--rose-f)); }
.pas-honnete p { margin-top: 1rem; text-align: left; }

/* ---------- Relais vers l'outil ---------- */
.pas-relais { margin-top: var(--sec); padding: clamp(2.6rem, 5vw, 3.5rem) var(--gout); display: grid; justify-items: center; gap: 1.2rem; text-align: center; background: linear-gradient(to bottom, var(--perle), var(--tablette)); }
.pas-relais__quoi { max-width: 32em; font-family: var(--f-titre); font-style: italic; font-weight: 300; font-size: var(--t-m); line-height: 1.35; }
.pas-relais .bouton + .pas-relais__quoi { margin-top: 1rem; }

/* ---------- Articles liés, sources, autres tutos ---------- */
.pas-lire { padding-bottom: 0; }
.pas-sources { padding: var(--sec) var(--gout) 0; text-align: center; }
.pas-sources__t { font-size: var(--t-xs); color: var(--gris); font-weight: 400; }
.pas-sources__liste { margin: 0.9rem auto 0; max-width: 46rem; display: grid; gap: 0.55rem; font-size: var(--t-s); }
.pas-sources__date { margin-top: 0.9rem; font-size: var(--t-xs); color: var(--gris); }

.pas-autres { padding: var(--sec) var(--gout); text-align: center; }
.pas-autres__t { font-family: var(--f-titre); font-weight: 300; font-size: var(--t-l); line-height: 1.1; }
.pas-autres__liste { position: relative; margin: clamp(2rem, 4vw, 2.8rem) auto 0; max-width: 52rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(2rem, 6vw, 5rem); }
.pas-autres__liste::before { content: ''; position: absolute; left: 50%; top: 10%; bottom: 10%; width: 1px; background: linear-gradient(to bottom, transparent, var(--argent), transparent); }
.pas-autres__item:only-child { grid-column: 1 / -1; }
.pas-autres__item a { display: grid; gap: 0.35rem; padding-block: 0.6rem; }
.pas-autres__item--g a { justify-items: end; text-align: right; }
.pas-autres__item--d a { justify-items: start; text-align: left; }
.pas-autres__emb { font-family: var(--f-titre); font-weight: 300; font-size: var(--t-xl); line-height: 1; color: var(--argent-f); transition: color 0.5s var(--ease); }
.pas-autres__nom { font-family: var(--f-titre); font-size: var(--t-m); line-height: 1.2; }
.pas-autres__meta { font-size: var(--t-xs); color: var(--gris); }
@media (hover: hover) { .pas-autres__item a:hover .pas-autres__emb { color: var(--rose-f); } .pas-autres__item a:hover .piece__trait { background-size: 100% 1px; } }
.pas-autres__item a:focus-visible .pas-autres__emb { color: var(--rose-f); }
.pas-autres__tous { margin-top: 2rem; font-size: var(--t-s); }

/* ---------- Index : la vitrine des tutos ---------- */
.pas-ouv--index { padding-bottom: clamp(1rem, 3vw, 2rem); }
.pas-vitrine { padding: 0 var(--gout) var(--sec); }
.pas-vitrine__rang { margin: 0 auto; max-width: 72rem; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; column-gap: clamp(2rem, 5vw, 5rem); }
.pas-vitrine__item--centre { grid-column: 2; grid-row: 1; --w: clamp(15rem, 22vw, 20rem); }
.pas-vitrine__item--g { grid-column: 1; grid-row: 1; justify-self: end; margin-top: clamp(4rem, 9vw, 8rem); --w: clamp(10.5rem, 14vw, 13.5rem); }
.pas-vitrine__item--d { grid-column: 3; grid-row: 1; justify-self: start; margin-top: clamp(7rem, 14vw, 12rem); --w: clamp(10.5rem, 14vw, 13.5rem); }
.pas-vitrine__lien { display: grid; justify-items: center; gap: 1.3rem; text-align: center; }
.pas-vitrine__scene { display: grid; place-items: center; }
.pas-vitrine__legende { display: grid; justify-items: center; gap: 0.4rem; max-width: 19rem; }
.pas-vitrine__meta, .pas-vitrine__duree { font-size: var(--t-xs); color: var(--gris); }
.pas-vitrine__sep { margin-inline: 0.3rem; color: var(--argent-f); }
.pas-vitrine__t { font-family: var(--f-titre); font-weight: 400; font-size: var(--t-m); line-height: 1.2; }
.pas-vitrine__item--centre .pas-vitrine__t { font-weight: 300; font-size: var(--t-l); line-height: 1.1; }

.pas-fils { padding: var(--sec) var(--gout); background: var(--nacre); border-block: 1px solid var(--filet); }
.pas-fil { margin: clamp(2.6rem, 5vw, 3.6rem) auto 0; max-width: 60rem; display: grid; justify-items: center; gap: 1.2rem; text-align: center; }
.pas-fil + .pas-fil { padding-top: clamp(2.6rem, 5vw, 3.6rem); }
.pas-fil + .pas-fil::before { content: ''; display: block; width: 1px; height: 2.4rem; margin: calc(-1 * clamp(2.6rem, 5vw, 3.6rem)) auto 0; background: var(--argent); }
.pas-fil__t { font-family: var(--f-titre); font-style: italic; font-weight: 300; font-size: var(--t-l); line-height: 1.1; }
.pas-fil__liste { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.55rem 0.6rem; }
.pas-fil__liste a { --rad: var(--r-pilule); display: inline-flex; align-items: center; gap: 0.55rem; min-height: 2.75rem; padding: 0.3rem 1rem 0.3rem 0.35rem; border: 1px solid var(--argent); border-radius: var(--rad); background: var(--blanc); font-size: var(--t-s); transition: border-color 0.3s var(--ease), translate 0.4s var(--ease); }
.pas-fil__n { --rad: var(--r-rond); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--rad); background: var(--perle); box-shadow: inset 0 0 0 1px var(--argent); font-family: var(--f-titre); font-size: var(--t-s); }
@media (hover: hover) { .pas-fil__liste a:hover { border-color: var(--rose-f); translate: 0 -2px; } }
.pas-fil__liste a:focus-visible { border-color: var(--rose-f); }

/* ---------- Téléphone ---------- */
@media (max-width: 899px) {
  .pas-vitrine__rang { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 3rem; column-gap: 1.1rem; }
  .pas-vitrine__item--centre { grid-column: 1 / -1; grid-row: 1; justify-self: center; --w: min(66vw, 18rem); }
  .pas-vitrine__item--g, .pas-vitrine__item--d { grid-row: 2; justify-self: center; margin-top: 0; --w: min(36vw, 11rem); }
  .pas-vitrine__item--g { grid-column: 1; }
  .pas-vitrine__item--d { grid-column: 2; margin-top: 2.5rem; }
  .pas-vitrine__item--g .pas-vitrine__t, .pas-vitrine__item--d .pas-vitrine__t { font-size: var(--t-ms); }
}
@media (max-width: 599px) {
  .pas-fiche { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "sceau sceau" "g d"; row-gap: 1.4rem; column-gap: 1.2rem; }
  .pas-fiche__sceau { grid-area: sceau; justify-self: center; }
  .pas-fiche__aile--g { grid-area: g; }
  .pas-fiche__aile--d { grid-area: d; }
  .pas-fiche__aile dd { font-size: var(--t-corps); }
  .pas-fiche__aile--g, .pas-fiche__aile--d { justify-self: center; justify-items: center; text-align: center; }
  .pas-fiche__aile--g::after, .pas-fiche__aile--d::before { display: none; }
  .pas-fiche::after { content: ''; grid-column: 1 / -1; grid-row: 2; justify-self: center; width: 1px; height: 100%; background: var(--argent); }
  .pas-croix__plan { column-gap: 0.6rem; row-gap: 1.1rem; }
  .pas-carte { width: 6.6rem; gap: 0.6rem; }
  .pas-carte__lame .m { --w: 4.6rem; }
  .pas-carte--centre .pas-carte__lame .m { --w: 5.4rem; }
  .pas-carte__n { font-size: var(--t-l); }
  .pas-carte__nom { font-size: var(--t-s); }
  .pas-carnet table { font-size: var(--t-xs); }
  .pas-carnet th, .pas-carnet td { padding: 0.5rem 0.25rem; }
  .pas-carnet input { width: 2.9rem; padding-inline: 0.15rem; }
  .pas-carnet .pas-long { display: none; }
  .pas-carnet .pas-court { display: inline; }
  .pas-carnet tfoot th, .pas-carnet tfoot td { font-size: var(--t-corps); }
  .pas-autres__liste { grid-template-columns: minmax(0, 1fr); row-gap: 1.6rem; }
  .pas-autres__liste::before { display: none; }
  .pas-autres__item--g a, .pas-autres__item--d a { justify-items: center; text-align: center; }
}

/* ---------- Impression du carnet ---------- */
@media print {
  body > *:not(main), main > *:not(.pas-carnet), .pas-carnet__actions, .pas-carnet__note { display: none !important; }
  .pas-carnet { background: none; border: 0; padding: 0; }
  .pas-carnet__table { box-shadow: none; }
  .pas-carnet [data-split], .pas-carnet [data-reveal] { visibility: visible !important; }
}

@media (prefers-reduced-motion: reduce) {
  .pas-fil__liste a, .pas-autres__emb { transition: none; }
}
