/* =========================================================================
   Spyglass · spyglass.css
   Styles propres à Spyglass, chargés après app.css (le kit commun à tous les
   sites, à ne pas modifier à la main). Une règle utile à un autre site va
   dans le kit (spyglass-redesign), puis est retirée d'ici.
   ========================================================================= */

/* Carte pleine largeur entre deux .home__row (tickets sans activité) : même espacement */
.home__aging { margin-bottom: 16px; }

/* Mobile : la topbar des rapports (vue, PDF, cloche, thème) dépassait 390 px.
   Le kit resserre la barre et masque les libellés ; ici, le sélecteur de vue en plus. */
@media (max-width: 560px) {
  .topbar__actions .segmented__item { font-size: 0; gap: 0; }   /* le reste de la barre du haut mobile est dans le kit */
}

/* Textes saisis par les utilisateurs (liens, chemins) : coupés plutôt que d'élargir la page */
.wizard__section { min-width: 0; }
.report__description, .wizard__diagnosis, .wizard__fix, .wizard__clue, .wizard__question, .console__msg, .console__src { overflow-wrap: anywhere; }

/* Réglages : blocs espacés, carte e-mail en largeur de lecture, titre de section plus petit */
.settings__block { margin-bottom: 28px; }
.settings__narrow { max-width: 640px; }
.page__title-sm { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xl); }
.webhook__body > * { min-width: 0; }

/* Organisations : tableau puis grille membres / projets */
.orgs__table { margin-bottom: 20px; }

/* Profil : envoi de la photo séparé du formulaire d'identité */
.profile__avatar-form { padding-top: 16px; border-top: 1px solid var(--line-2); }

/* Aperçu des e-mails : cadre de l'iframe arrondi par la carte, hauteur d'un e-mail complet */
.mail-preview__card { overflow: hidden; }
.mail-preview__card .mail-preview__frame { height: 900px; }


/* Erreurs console détaillées (extension 3.1.1) */
.console__hint { word-break: normal; overflow-wrap: break-word; margin-top: 6px; padding: 7px 9px; border-radius: 8px; font-family: var(--font-body, inherit); font-size: 12px; line-height: 1.45; color: var(--ink-2); background: color-mix(in oklab, var(--warning, #f59c1a) 12%, var(--surface, #fff)); }
.console__hint code { font-size: 11px; }
.console__stack { margin-top: 6px; }
.console__stack summary { cursor: pointer; font-size: 11.5px; color: var(--ink-3); }
.console__stack pre { margin: 6px 0 0; max-height: 180px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.45; color: var(--ink-2); }
.console { max-height: 420px; }

/* =========================================================================
   Composants propres à Spyglass, sortis d'app.css le 13/11/2026 (ils y avaient
   été ajoutés à la main et auraient disparu à la prochaine régénération du kit).
   ========================================================================= */

/* Logo de Nautilus dans un bouton (« Confier les travaux à Nautilus ») et dans le témoin animé. */
.btn__logo, .go-live .btn__logo { width: 16px; height: 16px; flex: none; border-radius: 4px; display: inline-block; vertical-align: -3px; }

/* Super Wizard (analyse par Nautilus) : bordure en dégradé qui tourne, halo qui respire, bandeau brillant.
   Distingue d'un coup d'œil un Wizard Nautilus d'un Wizard classique quand plusieurs tournent. */
@property --sw-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes sw-spin { to { --sw-angle: 360deg; } }
@keyframes sw-glow {
  0%, 100% { box-shadow: 0 6px 20px -10px color-mix(in oklab, #c026d3 55%, transparent); }
  50%      { box-shadow: 0 10px 32px -8px color-mix(in oklab, #4f45e9 75%, transparent); }
}
.ticket-card.is-super {
  border-color: transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              conic-gradient(from var(--sw-angle), #4f45e9, #c026d3, #f59e0b, #06b6d4, #4f45e9) border-box;
  animation: sw-spin 2.8s linear infinite, sw-glow 2.4s ease-in-out infinite;
}
.ticket-card.is-super .ticket-card__wizard {
  color: #fff; border-top-color: transparent;
  background: linear-gradient(90deg, #4f45e9, #c026d3, #4f45e9) 0 0 / 200% 100%;
  animation: shimmer 2.4s linear infinite;
}
.ticket-card.is-super .ticket-card__wizard::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); animation-duration: 1.1s; }
.badge-super { --badge-c: #fff; --badge-bg: linear-gradient(90deg, #4f45e9, #c026d3); background: linear-gradient(90deg, #4f45e9, #c026d3); }
.badge-super::before { background: #fff; }
@media (prefers-reduced-motion: reduce) {
  .ticket-card.is-super, .ticket-card.is-super .ticket-card__wizard, .ticket-card.is-super .ticket-card__wizard::after { animation: none; }
}

/* Transcription de la voix sous la vidéo */
.media__transcript { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--fs-sm); }
.media__transcript-head { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; }
.media__transcript-text { margin: 6px 0 0; color: var(--ink); line-height: 1.55; max-height: 220px; overflow-y: auto; white-space: normal; }
.media__transcript.is-failed .media__transcript-head { color: var(--danger-ink); }
.media__transcript .spinner-xs { width: 12px; height: 12px; border-width: 2px; }

/* Pied du Wizard : les boutons passent à la ligne quand les GO vers Nautilus s'ajoutent */
.wizard__footer { flex-wrap: wrap; }
/* GO vers Nautilus : groupés et calés à droite */
.wizard__go { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
/* Suivi des GO envoyés à Nautilus */
.wizard__suivi { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.wizard__suivi-list { display: flex; flex-direction: column; margin: 8px 0 0; padding: 0; list-style: none; }
.wizard__suivi-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: var(--fs-sm); }
.wizard__suivi-row:first-child { border-top: 0; padding-top: 2px; }
.wizard__suivi-row:last-child { padding-bottom: 0; }
.wizard__suivi-kind { display: inline-flex; align-items: center; gap: 7px; min-width: 112px; font-weight: 600; color: var(--ink); }
.wizard__suivi-kind .icon { width: 13px; height: 13px; color: var(--accent); }
.wizard__suivi-meta { flex: 1 1 160px; min-width: 0; color: var(--ink-3); }
@media (max-width: 560px) {
  .wizard__go { flex-direction: column; margin-left: 0; }
  .wizard__go form { width: 100%; }
}

/* ── Tickets en double (config/duplicates.php) ── */
.doublons-bandeau { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.doublons-bandeau .alert__text { flex: 1; }
.doublon-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; white-space: nowrap; }
.ticket-card .doublon-badge { align-self: flex-start; }
.table__truncate .doublon-badge { margin: 4px 0 0; }
.doublons-carte { border-color: var(--warning); box-shadow: 0 0 0 1px color-mix(in oklab, var(--warning) 35%, transparent); }
.doublon + .doublon { padding-top: 14px; border-top: 1px solid var(--line); }
.doublon__tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.doublon__texte { margin: 8px 0 4px; color: var(--ink); }
.doublon__raison { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 10px; font-size: var(--fs-sm); color: var(--ink-2); }

/* GO Nautilus en cours (01/12/2026) : à la place du bouton, un témoin vivant visible de tous jusqu'à la fin des travaux.
   Bordure en dégradé qui tourne et halo qui respire (comme le Super Wizard), point qui bat, reflet qui passe. */
.go-live {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px;
  min-height: 32px; padding: 6px 14px; border: 1.5px solid transparent; border-radius: var(--r-sm, 8px);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink); cursor: default; user-select: none;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              conic-gradient(from var(--sw-angle), #4f45e9, #c026d3, #f59e0b, #06b6d4, #4f45e9) border-box;
  animation: sw-spin 2.8s linear infinite, sw-glow 2.4s ease-in-out infinite;
}
.go-live .icon { width: 14px; height: 14px; color: var(--accent); }
.go-live::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in oklab, #c026d3 16%, transparent), transparent);
  animation: sweep 2.2s ease-in-out infinite;
}
.go-live__dot { width: 8px; height: 8px; flex: none; border-radius: 50%; color: #c026d3; background: currentColor; animation: ping 1.6s ease-out infinite; }
.go-live__step { font-weight: 500; color: var(--ink-3); }
.go-live__step::before { content: "·"; margin-right: 8px; }
.go-live-rollback .icon, .go-live-rollback .go-live__dot { color: var(--danger, #e5484d); }
@media (max-width: 560px) { .go-live { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) {
  .go-live, .go-live::after, .go-live__dot { animation: none; }
  .go-live { border-color: var(--accent); }
}
