/* Espace collaborateurs. */
body.pub main.pub-main { max-width: 1360px; margin: 0 auto; padding: 26px 28px 70px; }

.stepbar { background: #fff; border-bottom: 1px solid var(--line); display: flex; justify-content: center; gap: 6px; padding: 0 16px; }
.step { display: flex; align-items: center; gap: 10px; padding: 16px 26px 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.step-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; background: #e7e5f0; color: var(--muted); }
.step.on { color: var(--navy); border-bottom-color: var(--red); }
.step.on .step-n { background: var(--red); color: #fff; }
.step.done { color: var(--navy); }
.step.done .step-n { background: var(--teal); color: #fff; }

.pub-editor { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); gap: 22px; align-items: start; }
.pub-editor .card { border-radius: 12px; padding: 22px; }
.pub-editor .card h2 { font-size: 1.2rem; margin-bottom: 12px; }
.pub-editor .preview-col { position: sticky; top: 96px; }
.preview-col .preview-card { position: static; }
.preview-col .sheet-scroll { max-height: calc(100vh - 260px); }
.req { color: var(--red); margin-left: 2px; }
.form-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.tips { margin: 4px 0 0; padding-left: 18px; }
.tips li { margin: 2px 0; }
.btn.xl { padding: 15px 24px; font-size: 1.05rem; border-radius: 10px; margin-top: 14px; }

/* Champs de l'affiche (composant partagé) */
.pub-editor .field > .lbl { font-size: .92rem; }
.pub-editor details { background: var(--soft); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin: 6px 0 4px; }
.pub-editor details summary { list-style: none; }
.pub-editor details summary::-webkit-details-marker { display: none; }
.pub-editor details[open] summary { margin-bottom: 4px; }

/* Choix du modèle : la carte entière est cliquable */
.tcard.pick { text-align: left; font: inherit; color: inherit; padding: 0; }
.tcard.pick:hover .tedit { background: var(--red); color: #fff; border-color: var(--red); }
.tcard.pick .tbody { gap: 6px; }

/* Confirmation */
.confirm { max-width: 900px; margin: 10px auto 0; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding: 30px !important; border-radius: 14px; }
.confirm h1 { font-size: 1.7rem; margin: 12px 0 8px; }
.big-check { width: 64px; height: 64px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; }
.big-check.err { background: var(--red); margin: 0 auto; }
.linkcard { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 16px; }
.confirm-side .sheet { transform: rotate(2deg); }

/* Suivi */
.state { border-left: 5px solid var(--line) !important; }
.state-validee { border-left-color: var(--teal) !important; }
.state-en_attente { border-left-color: #e7a33e !important; }
.state-modifications { border-left-color: var(--navy) !important; }
.state-refusee { border-left-color: var(--red) !important; }
.state-row { display: flex; gap: 14px; align-items: flex-start; }
.state-row h2 { margin: 2px 0 4px !important; }
.state-row p { margin: 0; color: var(--muted); }
.state-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; }
.state-ic.ok { background: var(--teal); } .state-ic.wait { background: #e7a33e; } .state-ic.mod { background: var(--navy); } .state-ic.ko { background: var(--red); }

@media (max-width: 980px) {
  .pub-editor { grid-template-columns: 1fr; }
  .pub-editor .preview-col { position: static; order: -1; }
  .preview-col .sheet-scroll { max-height: none; }
  .confirm { grid-template-columns: 1fr; }
  .confirm-side { display: none; }
}
@media (max-width: 720px) {
  body.pub main.pub-main { padding: 16px 14px 110px; }
  .ph-header .header-link span:last-child { display: inline; }
  .step { padding: 12px 10px 10px; font-size: .85rem; gap: 6px; }
  .step-n { width: 24px; height: 24px; font-size: .78rem; }
  .pub-editor .card { padding: 16px; }
  .page-head h1 { font-size: 1.35rem; }
  /* Bouton d'envoi toujours accessible sur téléphone */
  .form-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); padding: 10px 14px; box-shadow: 0 -6px 20px rgba(35,26,81,.08); }
  .form-actions .btn.ghost { display: none; }
  .form-actions .btn.red { flex: 1; }
  .preview-head h2 { font-size: .95rem !important; }
}
@media (max-width: 720px) {
  .ph-header .brand img { height: 34px; }
  .app-title-main { font-size: 1.3rem; }
  .ph-header .header-link span:last-child { display: none; }
  .pub-editor.track .preview-col { order: 0; }
}
@media (max-width: 720px) { .pub-editor .card-title-row > .muted { display: none; } }

/* ---------- Assistant d'installation ---------- */
.wizard { max-width: 820px; }
.wizard .card { border-radius: 14px; padding: 28px !important; }
.wizard h1 { font-size: 1.6rem; }
.wizard-steps { gap: 8px; }
.wizard-steps span { display: flex; align-items: center; gap: 8px; border-top-width: 4px; padding-top: 10px; font-size: .82rem; }
.wizard-steps span i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #e7e5f0; color: var(--muted); font-size: .75rem; flex: none; }
.wizard-steps span.on i { background: var(--red); color: #fff; }
.wizard-steps span.done i { background: var(--teal); color: #fff; }
.wizard-steps span.done { border-color: var(--teal); }

/* ---------- Connexion Microsoft ---------- */
.btn.ms { background: #fff; color: #2f2f2f; border: 1px solid #8c8c8c; font-weight: 600; }
.btn.ms:hover { background: #f3f3f3; }
.ms-logo { display: inline-flex; }
.ph-header .header-link .ms-logo { background: #fff; border-radius: 3px; padding: 2px; }
.ms-identity { display: flex; align-items: center; gap: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; flex-wrap: wrap; }
.ms-identity .avatar { width: 42px; height: 42px; }
.ms-tag { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; font-size: .8rem; font-weight: 600; color: var(--muted); }
.ms-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #ecebf7; border-radius: 9px; padding: 10px 12px; margin-bottom: 14px; font-size: .88rem; }
.pub .usermenu .menu { right: 0; }
