/* Page Setup : rail d'étapes, bureau à l'échelle, cartes, formats. Récapitulatif et barre du bas : p-setup-recap.css. */
.atelier { padding-top: var(--sg-6); }

/* Rail : choisi (encre pleine), en cours (sceau), passé sans choix (pointillés), à venir (vide) */
.rail { position: sticky; top: 72px; z-index: 12; display: flex; margin-bottom: var(--sg-5); background: var(--sg-papier); border-bottom: 1px solid var(--sg-trait); }
.rail button { flex: 1; display: flex; align-items: center; gap: var(--sg-2); min-height: 56px; min-width: 0; padding: 0 var(--sg-2); border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: none; color: var(--sg-gris); font-size: var(--sg-t-petit); text-align: left; cursor: pointer; }
.rail .num { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--sg-champ); font: 400 15px/1 var(--sg-serif); flex: none; }
.rail .txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.rail .sous { font-size: var(--sg-t-legende); font-weight: 400; color: var(--sg-gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; min-height: 1.25em; }
.rail .choisi { color: var(--sg-encre); }
.rail .choisi .num { background: var(--sg-encre); border-color: var(--sg-encre); color: var(--sg-papier); }
.rail .passe .num { border-style: dashed; }
.rail [aria-current] { color: var(--sg-encre); font-weight: 600; border-bottom-color: var(--sg-encre); }
.rail [aria-current] .num { background: var(--sg-sceau); border-color: var(--sg-sceau); color: #fff; }
@media (hover: hover) { .rail button:hover { color: var(--sg-encre); } }
.etape-courante { display: none; }

.corps { display: grid; gap: var(--sg-5); }
.scene { position: relative; background: var(--sg-ecume); border: 1px solid var(--sg-trait); padding: var(--sg-4); align-self: start; }
.scene .cote { margin-top: var(--sg-2); text-align: center; font-size: var(--sg-t-petit); color: var(--sg-gris); }
.scene .legende { margin-top: var(--sg-3); font-size: 15px; line-height: 1.5; color: var(--sg-gris); min-height: 3em; }
.pastille-apercu { position: absolute; top: var(--sg-5); right: var(--sg-5); z-index: 3; padding: 2px 10px; background: var(--sg-encre); color: var(--sg-papier); font-size: 12px; font-weight: 600; border-radius: 999px; }
.scene-zone { min-width: 0; min-height: max(420px, calc(100vh - 330px)); }
@media (prefers-reduced-motion: no-preference) {
  .etape.entre { animation: entre .28s ease both; }
  @keyframes entre { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
}
.etape h2 { margin-bottom: var(--sg-2); }
.etape h2:focus { outline: none; box-shadow: none; }
.etape > .aide { margin: 0 0 var(--sg-5); font-size: 15px; line-height: 1.5; }
.filtres { display: flex; flex-wrap: wrap; gap: var(--sg-2); margin-bottom: var(--sg-5); }
.chip { min-height: 44px; padding: 0 var(--sg-4); border: 1px solid var(--sg-champ); border-radius: 999px; background: var(--sg-blanc); font-weight: 500; font-size: var(--sg-t-petit); cursor: pointer; }
.chip small { font-size: 12px; color: var(--sg-gris); margin-left: 2px; }
.chip[aria-pressed="true"] { background: var(--sg-encre); border-color: var(--sg-encre); color: var(--sg-papier); }
.chip[aria-pressed="true"] small { color: var(--sg-ecume); }
@media (hover: hover) { .chip[aria-pressed="false"]:hover { border-color: var(--sg-encre); } }
[hidden] { display: none !important; }

/* Cartes : même cadre partout (tapis à plat, claviers et souris détourés) */
.art-grille { display: grid; gap: var(--sg-4); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.art { position: relative; }
.art > input, .sw-opts input, .fmt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.art > label { display: block; position: relative; margin: 0; padding: var(--sg-3); background: var(--sg-blanc); border: 1px solid var(--sg-trait); font-weight: 400; cursor: pointer; }
.art img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.art img.decoupe { object-fit: contain; padding: 6%; background: var(--sg-papier); }
.art img.plat { aspect-ratio: 2.25; object-fit: cover; border-radius: 2px; }
.art b { display: block; margin-top: var(--sg-3); font: 400 var(--sg-t-carte)/1.3 var(--sg-serif); padding-right: var(--sg-6); }
.art .sens, .art .prix, .art .qwerty { display: block; font-size: var(--sg-t-petit); }
.art .sens { color: var(--sg-gris); }
.art .qwerty { font-weight: 600; color: var(--sg-lien); }
.art .prix { margin-top: var(--sg-1); font-weight: 600; }
.coche { position: absolute; top: var(--sg-4); right: var(--sg-4); width: 24px; height: 24px; border: 1.5px solid var(--sg-champ); border-radius: 2px; background: var(--sg-blanc); }
.art > input[type="radio"] + label .coche { border-radius: 50%; }
.art > input:checked + label, .fmt input:checked + label { border-color: var(--sg-encre); box-shadow: inset 0 0 0 1px var(--sg-encre); }
.art > input:checked + label .coche, .fmt input:checked + label .coche { background: var(--sg-encre); border-color: var(--sg-encre); }
.art > input:checked + label .coche::after, .fmt input:checked + label .coche::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid var(--sg-papier); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.art > input:focus-visible + label, .fmt input:focus-visible + label, .sw-opts input:focus-visible + label { box-shadow: var(--sg-focus); }
@media (hover: hover) { .art > input:not(:checked) + label:hover, .fmt input:not(:checked) + label:hover { border-color: var(--sg-lave); } }
.art.bloque > label { opacity: .5; cursor: not-allowed; }
.sw-opts { display: flex; flex-wrap: wrap; padding: 0 var(--sg-2) var(--sg-2); background: var(--sg-blanc); border: 1px solid var(--sg-trait); border-top: 0; }
.pt { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: 0; cursor: pointer; }
.pt span { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--sg-champ); }
.art:has(> input:checked) .sw-opts input:checked + .pt span { box-shadow: 0 0 0 2px var(--sg-blanc), 0 0 0 4px var(--sg-encre); }
.pt.txt { padding: 0 var(--sg-3); border: 1px solid var(--sg-champ); margin: var(--sg-1); font-size: var(--sg-t-legende); font-weight: 500; }
.art:has(> input:checked) .sw-opts input:checked + .pt.txt { background: var(--sg-encre); color: var(--sg-papier); border-color: var(--sg-encre); }
.rayon.replie .art:nth-child(n+7) { display: none; }
.plus { margin-top: var(--sg-5); }
.note-format { margin-top: var(--sg-4); padding: var(--sg-3) var(--sg-4); background: var(--sg-ecume); font-size: 15px; }
.retirer, .compteur { margin-top: var(--sg-4); font-size: var(--sg-t-petit); }

.fmt-grille { display: grid; gap: var(--sg-3); grid-template-columns: 1fr; }
.fmt { position: relative; }
.fmt label { display: block; position: relative; margin: 0; padding: var(--sg-4) var(--sg-7) var(--sg-4) var(--sg-5); background: var(--sg-blanc); border: 1px solid var(--sg-trait); font-weight: 400; cursor: pointer; }
.fmt label .coche { border-radius: 50%; }
.fmt b { display: block; font: 400 var(--sg-t-h3)/1.3 var(--sg-serif); }
.fmt .usage { display: block; color: var(--sg-gris); font-size: var(--sg-t-petit); }
.fmt .prix { display: block; margin-top: var(--sg-2); font-weight: 600; }

@media (max-width: 1023px) {
  .rail { top: 56px; }
  .rail .sous { display: none; }
  .etape-courante { display: flex; justify-content: space-between; gap: var(--sg-3); margin: calc(-1 * var(--sg-3)) 0 var(--sg-4); font-size: var(--sg-t-petit); }
  .etape-courante span { color: var(--sg-gris); text-align: right; }
}
@media (max-width: 767px) {
  .rail .lib { display: none; }
  .rail button { justify-content: center; padding-inline: var(--sg-1); }
  .scene { display: grid; grid-template-columns: 48% 1fr; gap: var(--sg-3); align-items: center; padding: var(--sg-3); }
  .scene .bureau { grid-row: span 3; }
  .scene .cote { margin: 0; text-align: left; font-size: var(--sg-t-legende); }
  .scene .legende { display: none; }
  .scene .agrandir { margin: 0; min-height: 40px; padding: 0 var(--sg-3); }
  .pastille-apercu { top: var(--sg-2); right: auto; left: var(--sg-2); }
  .scene-zone { min-height: 0; }
}
@media (min-width: 768px) { .art-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fmt-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .corps { grid-template-columns: 340px minmax(0, 1fr); gap: var(--sg-7); }
  .scene { position: sticky; top: 150px; }
  .art-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) { .art-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); } .corps { grid-template-columns: 400px minmax(0, 1fr); } }
@media (max-width: 359px) { .art-grille { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .fmt label { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--sg-3); padding: var(--sg-3) 52px var(--sg-3) var(--sg-4); }
  .fmt b { font-size: 18px; }
  .fmt .prix { grid-column: 2; grid-row: 1; margin: 0; align-self: center; }
  .fmt .usage { grid-column: 1 / -1; }
}

/* Setups prêts : prix puis précision du format sur deux lignes, pour toutes les cartes */
.pret .total .petit { display: block; }
