/* Démonstration « Version complète » (échantillon) : mise en page des scènes. Complète demo_voyage_colis.css (menu, barre des étapes, carte, boutons). */
.cx .dv-wrap { max-width: 1200px; }

/* Grande scène à gauche, carte « votre outil actuel / AtlasGo » à droite (tablette en paysage, ordinateur) */
.cx-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.cx-left { min-width: 0; }
.cx-stage { position: relative; height: clamp(220px, calc(100vh - 345px), 470px); background: #fff; border: 2px solid var(--pk-line); border-radius: 14px; overflow: hidden; --cx-pw: 84px; }
.cx-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cx-front { z-index: 40; pointer-events: none; }
.cx-front .hit { pointer-events: auto; cursor: pointer; }
.cx-stage .piko-fly { z-index: 31; }
.cx-stage .piko-svg { width: var(--cx-pw); }
.cx-card { margin-top: 0; }
.cx-card .dv-cols { grid-template-columns: 1fr; margin-top: 8px; gap: 8px; }
.cx-card .dv-title { font-size: 25px; }
.cx-card .dv-box p { font-size: 21px; }

/* Rappel du matériel : la preuve qu'on n'a besoin ni de douchette ni d'ordinateur */
.cx-gear { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; font-size: 14px; font-weight: 700; flex-wrap: nowrap; }
.cx-gear span { white-space: nowrap; padding: 2px 9px; border: 2px solid var(--pk-line); border-radius: 999px; background: #fff; }
.cx-gear .no { border-color: var(--pk-primary); background: var(--dv-green-bg); color: var(--pk-primary); }
.cx-gear .no::before { content: "\2713\00a0"; }

/* Barre des scènes : celles qui existent, et celles qui viennent après votre validation */
.dv-pill.soon { border-style: dashed; background: transparent; color: var(--pk-muted); cursor: default; font-weight: 600; }
.dv-pill.soon .n { background: transparent; border: 2px dashed var(--pk-line); }
.dv-pill .s { display: none; }
.cx .dv-pill { white-space: nowrap; font-size: 16px; padding: 0 4px; }
.cx .dv-pills { gap: 6px; }

/* Éléments dessinés dans les scènes */
.cx-svg text { font-family: "Segoe UI", system-ui, Arial, sans-serif; }
.cx-ping { fill: none; stroke: var(--pk-orange); stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: cx-ping 1.2s ease-out infinite; }
@keyframes cx-ping { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }
.cx-hint { font-size: 12px; font-weight: 800; fill: var(--pk-orange); }

/* Fenêtre de zoom du QR */
.cx-modal { position: fixed; inset: 0; z-index: 100; background: rgba(15, 20, 24, .62); display: flex; align-items: center; justify-content: center; padding: 14px; }
.cx-modal[hidden] { display: none; }
.cx-modal-box { position: relative; width: min(900px, 100%); max-height: calc(100vh - 28px); overflow: auto; background: #fff; border-radius: 18px; padding: 18px 20px 20px; box-shadow: 0 20px 60px #0008; animation: cx-pop .25s ease-out; }
@keyframes cx-pop { 0% { transform: scale(.92); opacity: 0; } 100% { transform: none; opacity: 1; } }
.cx-modal-box h2 { margin: 0 44px 12px 0; font-size: 26px; color: var(--pk-primary); }
.cx-modal-x { position: absolute; top: 10px; right: 12px; width: 48px; height: 48px; border: 2px solid var(--pk-line); border-radius: 12px; background: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.cx-modal-body { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }
.cx-qr { margin: 0; text-align: center; }
.cx-qr #cx-qr-big { width: 250px; max-width: 100%; aspect-ratio: 1; border: 3px solid var(--pk-ink); border-radius: 12px; overflow: hidden; background: #fff; margin: 0 auto; }
.cx-qr #cx-qr-big svg { display: block; width: 100%; height: 100%; }
.cx-qr figcaption { margin-top: 8px; font-size: 16px; color: var(--pk-muted); }
.cx-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cx-facts li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; padding: 8px 12px; border: 2px solid var(--pk-line); border-radius: 12px; background: #fbf9f4; }
.cx-facts .i { font-size: 28px; line-height: 1.1; }
.cx-facts b { display: block; font-size: 20px; }
.cx-facts span.t { font-size: 18px; color: var(--pk-muted); line-height: 1.3; }

@media (max-width: 899px) {
  .cx-main { grid-template-columns: 1fr; gap: 8px; }
  .cx-stage { height: clamp(200px, calc((100vw - 20px) * .62), 420px); }
  .cx-card .dv-title { font-size: 22px; }
  .cx-card .dv-box p { font-size: 19px; }
  .cx-gear { font-size: 13px; flex-wrap: wrap; }
  .cx-gear span { padding: 2px 8px; }
}
@media (max-width: 760px) {
  .cx-gear { display: none; }
  .cx-card { padding: 8px 12px 10px; }
  .cx-card .dv-box p { font-size: 18px; }
  .cx-card .dv-title { font-size: 20px; }
  .cx .dv-pills { overflow: hidden; }
  .dv-pill.soon .t { display: none; }
  .dv-pill.soon { flex: 0 0 38px; padding: 0; }
  .dv-pill.soon .n { width: 22px; height: 22px; }
  .cx-modal-body { grid-template-columns: 1fr; gap: 12px; }
  .cx-qr #cx-qr-big { width: 190px; }
  .cx-modal-box h2 { font-size: 21px; }
  .cx-facts b { font-size: 18px; }
  .cx-facts span.t { font-size: 16px; }
}
@media (min-width: 900px) and (max-height: 720px) {
  .cx-stage { height: clamp(200px, calc(100vh - 300px), 420px); }
  .cx-card .dv-box p { font-size: 18px; line-height: 1.25; }
  .cx-card .dv-title { font-size: 20px; }
  .cx-card .dv-lab small { display: none; }
  .cx-card .dv-box { padding: 5px 12px 7px; }
  .cx-card .dv-role-slot .pk-role { min-height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .cx-ping, .cx-modal-box { animation: none; }
}

/* ---------- L'interrupteur « Ajouter un salon » : gros, visible, au-dessus de la scène ---------- */
.cx-opt { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; padding: 6px 12px; min-height: 52px; background: #fff; border: 3px solid var(--pk-orange); border-radius: 14px; cursor: pointer; user-select: none; }
.cx-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cx-sw { position: relative; flex: none; width: 62px; height: 34px; border-radius: 17px; background: #b9b3a3; transition: background .2s; }
.cx-sw::after { content: ""; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #0006; transition: transform .2s; }
.cx-opt input:checked + .cx-sw { background: var(--pk-primary); }
.cx-opt input:checked + .cx-sw::after { transform: translateX(28px); }
.cx-opt input:focus-visible + .cx-sw { outline: 4px solid var(--pk-orange); outline-offset: 3px; }
.cx-opt-t { flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.cx-opt-t b { font-size: 20px; font-weight: 800; }
.cx-opt-t small { font-size: 14px; color: var(--pk-muted); }
.cx-opt-n { flex: none; padding: 3px 12px; border-radius: 999px; background: var(--pk-primary); color: #fff; font-weight: 800; font-size: 16px; }

.cx-cahier-btn { background: #fff7ea; border-color: var(--pk-orange); color: #7a3b00; }

/* ---------- Cahier des recettes (à part du parcours) ---------- */
.cx-cahier-box { width: min(860px, 100%); }
.cx-cahier-pre { margin: 0 52px 10px 0; font-size: 17px; font-weight: 800; color: var(--pk-primary); }
.cx-paper { background: #e7ecf2; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 33px, #e0a3a3 33px, #e0a3a3 34px); border: 2px solid #aab6c4; border-radius: 6px; padding: 12px 16px; font-family: "Courier New", ui-monospace, monospace; }
.cx-paper-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 3px double #5a6b80; padding-bottom: 6px; }
.cx-paper-head h2 { margin: 0; font-size: 24px; letter-spacing: .08em; color: #243447; }
.cx-paper-head span { font-size: 14px; color: #44546a; }
.cx-paper-t { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 18px; color: #1d2d6b; }
.cx-paper-t th { text-align: left; font-size: 13px; color: #44546a; border-bottom: 2px solid #5a6b80; padding: 4px 6px; }
.cx-paper-t td { padding: 7px 6px; border-bottom: 1px solid #b7c2d0; font-style: italic; font-weight: 700; }
.cx-paper-t .r { text-align: right; }
.cx-paper-t tfoot td { border-top: 2px solid #5a6b80; border-bottom: 0; font-style: normal; color: #243447; }
.cx-cahier-pts { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 6px; font-size: 18px; }

@media (max-width: 899px) {
  .cx-opt { min-height: 46px; padding: 4px 10px; border-width: 2px; }
  .cx-sw { width: 54px; height: 30px; } .cx-sw::after { width: 22px; height: 22px; } .cx-opt input:checked + .cx-sw::after { transform: translateX(24px); }
  .cx-opt-t b { font-size: 17px; } .cx-opt-t small { font-size: 12px; }
  .cx-opt-n { font-size: 14px; padding: 2px 9px; }
  .cx-paper-t { font-size: 14px; } .cx-cahier-pts { font-size: 16px; }
}
@media (min-width: 900px) and (max-height: 720px) {
  .cx-opt { min-height: 42px; padding: 2px 10px; margin-bottom: 6px; }
  .cx-opt-t b { font-size: 17px; } .cx-opt-t small { font-size: 12px; }
}

/* 7 pastilles sur une tablette (900 à 1150 px) : texte un peu plus petit, pas de débordement */
@media (min-width: 761px) and (max-width: 1150px) {
  .cx .dv-pill { font-size: 13px; gap: 4px; padding: 0 2px; border-width: 2px; }
  .cx .dv-pill .n { width: 20px; height: 20px; font-size: 12px; }
}
