/* Page démo produit - futurs utilisateurs */

.demo-popup[hidden] {
  display: none !important;
}

.demo-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(8, 76, 100, 0.48);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(0.5rem, 2vw, 1.25rem);
  overflow-y: auto;
}

.demo-popup-dialog {
  width: min(920px, 100%);
  max-height: min(100dvh - 1rem, 100vh - 1rem);
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(8, 76, 100, 0.12));
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(8, 76, 100, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.demo-popup-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 1rem 1.25rem 1.25rem;
  flex: 1 1 auto;
  min-height: 0;
}

.demo-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border, rgba(8, 76, 100, 0.1));
  background: var(--surface2, rgba(255, 255, 255, 0.6));
}

.demo-popup-kicker {
  margin: 0 0 0.25rem;
}

.demo-popup-title {
  margin: 0;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--text, #084c64);
  line-height: 1.25;
}

.demo-popup-kicker,
.demo-popup .demo-tour-lead,
.demo-popup .demo-tour-step-label,
.demo-popup .demo-tour-caption,
.demo-popup .demo-film-status {
  color: var(--text, #084c64);
}

.demo-popup .demo-tour-lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.demo-popup .demo-tour-shell {
  margin: 0;
}

.demo-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.demo-nav h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.demo-nav-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#demo-nav-launch[aria-current="page"] {
  opacity: 0.95;
}

.demo-main {
  flex: 1;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.demo-hero {
  margin-bottom: 2.5rem;
}

.demo-section {
  margin-bottom: 3rem;
}

.demo-section-head {
  margin-bottom: 0.75rem;
}

.demo-section-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  color: var(--color-ink);
}

.demo-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.demo-hint {
  margin: 0 0 1rem;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
  color: var(--warning-text);
}

.demo-board-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.demo-board-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem 0;
}

.demo-board-members {
  padding: 0 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.demo-subtitle {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.demo-invite-note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.demo-board-canvas {
  min-height: 280px;
}

.demo-drag-hint {
  margin: 0;
  padding: 0.65rem 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  background: var(--surface2);
  border-top: 1px solid var(--border);
}

.demo-feature-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.demo-feature-tab {
  padding: 0.45rem 0.85rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.demo-feature-tab:hover {
  border-color: var(--accent);
  color: var(--text);
}

.demo-feature-tab.is-active {
  background: var(--nav-bg);
  border-color: var(--nav-bg);
  color: var(--nav-text);
}

.demo-feature-panels {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.demo-features-compact {
  margin-bottom: 1rem !important;
}

.demo-panel-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.demo-panel-note {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.demo-checklist {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  line-height: 1.6;
  color: var(--text);
}

.demo-mock-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.demo-board-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.demo-board-list-item--new {
  border-style: dashed;
  color: var(--muted);
  justify-content: center;
}

.demo-roles-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.demo-roles-table th,
.demo-roles-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.demo-roles-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.demo-scrum-preview {
  margin: 0 0 1rem;
  padding: 1rem;
  background: var(--surface2);
  border-radius: var(--radius);
}

.demo-voice-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.35rem 0 0.5rem;
}

.demo-voice-chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1 1 12rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent, #3d9aa3) 40%, var(--border));
  background: var(--accent-soft, rgba(14, 165, 233, 0.12));
  font-size: 0.88rem;
}

.demo-voice-chip strong {
  color: var(--accent, #0ea5e9);
}

.demo-voice-chip span {
  color: var(--muted);
  font-size: 0.82rem;
}

.demo-film-modal .scrum-field {
  margin-bottom: 0.85rem;
}

.demo-film-modal .scrum-field-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.35rem;
}

.demo-film-modal .scrum-mode-btn {
  pointer-events: auto;
}

.demo-vault-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.demo-vault-mask {
  font-family: monospace;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.demo-cta {
  justify-content: center;
}

.demo-footer {
  margin-top: auto;
}

/* --- Démo guidée --- */

.demo-tour-shell {
  background: var(--surface, rgba(255, 255, 255, 0.92));
  border: 1px solid var(--border, rgba(8, 76, 100, 0.12));
  border-radius: 14px;
  padding: 1.25rem 1.35rem 1.5rem;
  box-shadow: 0 8px 32px rgba(8, 76, 100, 0.08);
}

.demo-tour-lead {
  max-width: 42rem;
}

.demo-tour-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.demo-tour-progress-wrap {
  flex: 1 1 8rem;
  height: 6px;
  background: rgba(8, 76, 100, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.demo-tour-progress-bar {
  height: 100%;
  width: 11%;
  background: linear-gradient(90deg, #084c64, #5aa4aa);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.demo-tour-step-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #516f7e);
  white-space: nowrap;
}

.demo-tour-step-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  color: var(--color-ink, #084c64);
}

.demo-tour-caption {
  margin: 0 0 1rem;
  color: var(--muted, #516f7e);
  font-size: 0.95rem;
  line-height: 1.5;
}

.demo-tour-stage {
  min-height: min(20rem, 45dvh);
  position: relative;
  z-index: 1;
}

.demo-film-wrap {
  position: relative;
  border-radius: 10px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.4);
  padding: clamp(0.4rem, 1.5vw, 1rem);
  min-height: min(20rem, 45dvh);
}

.demo-film-wrap:has(.demo-film-page--modal) {
  min-height: 0;
  overflow: visible;
}

.demo-film-status {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  color: var(--muted, #516f7e);
  text-align: center;
}

.demo-tour-nav--film {
  justify-content: center;
  border-top: none;
  padding-top: 0.5rem;
  margin-top: 0.25rem;
}

/* Curseur simulé */
.demo-cursor {
  position: absolute;
  z-index: 40;
  width: 22px;
  height: 22px;
  margin: -4px 0 0 -4px;
  pointer-events: none;
  transition: left 0.55s cubic-bezier(0.4, 0, 0.2, 1), top 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.demo-cursor.is-visible {
  opacity: 1;
}

.demo-cursor::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-left: 11px solid #084c64;
  border-top: 6px solid transparent;
  border-bottom: 12px solid transparent;
  filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.25));
}

.demo-click-pulse {
  position: absolute;
  z-index: 39;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  border: 2px solid rgba(8, 76, 100, 0.55);
  pointer-events: none;
  opacity: 0;
}

.demo-click-pulse.is-active {
  animation: demo-pulse 0.45s ease-out forwards;
}

@keyframes demo-pulse {
  0% { transform: scale(0.35); opacity: 0.9; }
  100% { transform: scale(1.4); opacity: 0; }
}

.demo-field-active {
  outline: 2px solid rgba(90, 164, 170, 0.65);
  outline-offset: 2px;
  background: #fff !important;
}

.demo-click-flash {
  animation: demo-btn-flash 0.35s ease;
}

@keyframes demo-btn-flash {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.12); transform: scale(0.98); }
}

.demo-scene-in {
  animation: demo-scene-in 0.45s ease;
}

@keyframes demo-scene-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.demo-reveal-in {
  animation: demo-reveal-in 0.5s ease;
}

@keyframes demo-reveal-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.demo-card-clone {
  position: absolute;
  z-index: 35;
  pointer-events: none;
  box-shadow: 0 12px 28px rgba(8, 76, 100, 0.22);
  border-radius: 8px;
}

.demo-card-landed {
  animation: demo-card-land 0.4s ease;
}

@keyframes demo-card-land {
  0% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.demo-film-toast {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: rgba(8, 76, 100, 0.92);
  color: #fff;
  font-size: 0.82rem;
  white-space: nowrap;
}

.demo-tour-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(8, 76, 100, 0.1);
}

.demo-mock {
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed rgba(8, 76, 100, 0.18);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}

.demo-mock--auth .demo-mock-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.demo-mock--auth .demo-mock-tabs span {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(8, 76, 100, 0.06);
}

.demo-mock--auth .demo-mock-tabs span.is-active {
  background: #084c64;
  color: #fff;
}

.demo-mock .form-group {
  margin-bottom: 0.85rem;
}

.demo-mock .form-group label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted, #516f7e);
  margin-bottom: 0.3rem;
}

.demo-mock .form-input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border, #c5d4dc);
  font: inherit;
  background: #fff;
}

.demo-mock .password-field-wrap {
  display: block;
  position: relative;
}

.demo-mock .password-field-wrap .form-input[type="password"],
.demo-mock .password-field-wrap .form-input[type="text"] {
  padding-right: 2.85rem;
}

.demo-mock-note,
.demo-mock-success {
  font-size: 0.88rem;
  margin: 0.75rem 0 0;
  line-height: 1.45;
}

.demo-mock-success {
  color: #1a6b4a;
}

.demo-mock-context {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--muted, #516f7e);
}

.demo-checklist--compact {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.demo-board-shell--tour {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.demo-card-due {
  font-size: 0.72rem;
  color: var(--muted, #516f7e);
  margin-top: 0.35rem;
}

.demo-tour-move-row {
  margin: 1rem 0 0.35rem;
  text-align: center;
}

.demo-explore-actions {
  margin-top: 1rem;
}

.demo-overlay[hidden] {
  display: none !important;
}

.demo-overlay:not([hidden]) {
  display: flex;
  z-index: 200;
}

.demo-overlay .modal {
  max-height: min(90vh, 520px);
}

.demo-card-preview h3 {
  margin: 1rem 0 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.demo-card-preview h3:first-child {
  margin-top: 0;
}

.demo-card-preview .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  background: var(--accent-soft);
  border-radius: 6px;
}

.demo-card-preview .comment {
  padding: 0.65rem;
  margin-top: 0.5rem;
  background: var(--surface2);
  border-radius: 8px;
  font-size: 0.9rem;
}

.demo-card-preview .comment .who {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.demo-page--live {
  min-height: 100vh;
}

.demo-coach {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0.9rem 1.15rem 1rem;
  background: var(--surface);
  border-bottom: 2px solid var(--accent, #3d9aa3);
  box-shadow: var(--shadow-md);
}

.demo-coach-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  margin-bottom: 0.75rem;
}

.demo-coach-kicker {
  margin: 0 0 0.15rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, #0e7490);
}

.demo-coach-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.demo-coach-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 40rem;
}

.demo-coach-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.demo-coach-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.5rem;
}

.demo-coach-guides {
  background: var(--accent-soft, rgba(14, 165, 233, 0.14));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 1rem 0.75rem;
}

body.demo-tuto-on .demo-coach-guides {
  display: none;
}

body.demo-tuto-on .demo-coach-nav {
  pointer-events: none;
  opacity: 0.45;
}

.demo-tuto {
  position: fixed;
  z-index: 120;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  padding: 0 1rem 1.15rem;
  pointer-events: none;
}

.demo-tuto[hidden] {
  display: none !important;
}

.demo-tuto-card {
  pointer-events: auto;
  width: min(36rem, 100%);
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--accent, #3d9aa3);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.15rem 1.1rem;
}

.demo-tuto-step {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, #0e7490);
}

.demo-tuto-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.12rem;
}

.demo-tuto-card p#demo-tuto-text {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

.demo-tuto-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

body.demo-tuto-on .demo-page {
  pointer-events: none;
}

body.demo-tuto-on .is-tuto-target {
  pointer-events: auto;
  position: relative;
  z-index: 90;
  box-shadow: 0 0 0 3px var(--accent-bright, #0ea5e9), 0 0 0 9999px rgba(4, 12, 20, 0.58);
  border-radius: 12px;
}

body.demo-tuto-on .layout-nav .is-tuto-target {
  z-index: 91;
}

body.demo-tuto-on .demo-exit {
  pointer-events: auto;
  position: relative;
  z-index: 92;
}

.demo-coach-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
}

.demo-coach-list li + li {
  margin-top: 0.28rem;
}

.demo-coach-list strong {
  color: var(--text);
}

.demo-view[hidden] {
  display: none !important;
}

.demo-live-hint {
  margin: 0 1.25rem 0.85rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--accent-soft, rgba(14, 165, 233, 0.12));
  border: 1px solid var(--border);
  border-radius: 10px;
}

.demo-live-hint p {
  margin: 0 0 0.35rem;
}

.demo-live-hint ul {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.45;
}

.demo-tile-muted {
  opacity: 0.85;
  cursor: default;
}

.demo-page--live .demo-cta {
  margin: 1.5rem auto 0.5rem;
  padding: 0 1.25rem;
}

.demo-page--live .welcome-footnote {
  padding: 0 1.25rem 1rem;
}

#demo-export-card {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.demo-page--live .home-hero {
  min-height: calc(100dvh - 5rem);
}

@media (max-width: 720px) {
  .demo-coach-list {
    font-size: 0.86rem;
  }

  .demo-nav.layout-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .demo-nav-actions {
    justify-content: flex-end;
  }

  .demo-board-canvas .column {
    flex: 0 0 min(260px, calc(100vw - 1.7rem));
  }

  .demo-tuto {
    padding: 0 max(0.75rem, env(safe-area-inset-left, 0px))
      calc(0.85rem + env(safe-area-inset-bottom, 0px)) max(0.75rem, env(safe-area-inset-right, 0px));
  }

  .demo-tuto-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .demo-tuto-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .demo-live-hint {
    margin-left: 0.85rem;
    margin-right: 0.85rem;
  }

  .demo-page--live .demo-cta,
  .demo-page--live .welcome-footnote {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}
