/* Tandem - Atelier de Co-construction
   Design System & Print Rules
*/

/* L'accès au formulaire reste disponible même si app.js ne démarre pas. */
#modalAuth.hidden { display: none; }
#modalAuth:target { display: flex; }

.title-with-icon { display: flex; align-items: center; gap: 0.625rem; }
.title-icon { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 0.5rem; flex: 0 0 2rem; }
/* Les icônes de titres restent devant le texte, même sur petit écran. */
:is(h1, h2, h3, h4, h5, h6) > :is(svg, i)[data-lucide] { flex-shrink: 0; }

@keyframes pulse-subtle {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.35);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(79, 70, 229, 0);
  }
}

@keyframes step-slide-fade {
  from {
    opacity: 0.35;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-content-anim {
  animation: step-slide-fade 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.active-card-glow {
  animation: pulse-subtle 2.5s infinite;
  border-color: #4f46e5 !important;
  background-color: #ffffff !important;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f8fafc;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Print / PDF Styling */
@media print {
  @page {
    size: A4 landscape;
    margin: 1cm;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    overflow: visible !important;
    height: auto !important;
  }

  .no-print {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  main {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
  }

  .canvas-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  .canvas-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }

  .canvas-card {
    break-inside: avoid !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    padding: 12px !important;
    border-radius: 8px !important;
  }

  .canvas-card textarea {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    resize: none !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
    color: #0f172a !important;
  }

  .btn-focus-card, .btn-card-validate {
    display: none !important;
  }

  .card-status-badge {
    border: 1px solid #94a3b8 !important;
  }

  #synthesisBox {
    break-inside: avoid !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
  }

  #synthesisBox * {
    color: #0f172a !important;
  }
}

/* ==========================================
   SIGNALEMENT CONTEXTUEL (CTRL + CLIC DROIT)
   ========================================== */
@keyframes feedback-target-pulse {
  0%, 100% {
    outline: 3px solid #6366f1;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25), 0 0 16px rgba(99, 102, 241, 0.4);
  }
  50% {
    outline: 3px solid #f43f5e;
    outline-offset: 5px;
    box-shadow: 0 0 0 8px rgba(244, 63, 94, 0.25), 0 0 24px rgba(244, 63, 94, 0.5);
  }
}

.tandem-feedback-target-ring {
  animation: feedback-target-pulse 1.8s infinite ease-in-out !important;
  position: relative !important;
  z-index: 45 !important;
  transition: all 0.2s ease-in-out !important;
}
