/* Aide, guide et attente des exports. Les détails explicatifs restent dans le guide ; les opérations affichent un état bref. */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--surface, #fff);
  color: var(--ink, #29233a);
  border: 2px solid var(--focus, #6544bf);
  border-radius: 10px;
}
.skip-link:focus {
  top: 12px;
}
.help-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--violet-dark, #543695);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 10px 0;
}
.installation-help {
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.installation-help > summary {
  padding: 16px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.installation-help > summary span {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 12px;
}
.installation-help .android-download {
  margin: 0;
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.installation-note {
  padding: 0 20px 16px;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.installation-note a,
.login-assistance a {
  color: var(--violet-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-assistance {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin: 20px 0 0;
}
.quick-steps {
  padding: 0;
  margin: 0 0 24px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.quick-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.quick-steps li > b {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--violet-soft);
  color: var(--violet-dark);
  font-size: 15px;
}
.quick-steps strong {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.quick-steps span {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 4px;
}
.quickstart-help {
  margin-bottom: 24px;
}
.quickstart-help > summary {
  cursor: pointer;
  color: var(--violet-dark);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 0;
}
.quickstart-help .quick-steps {
  margin: 8px 0 0;
}
.export-dialog {
  width: min(540px, calc(100vw - 32px));
}
.export-dialog progress {
  width: 100%;
  height: 18px;
  accent-color: var(--violet);
}
/* Attente : un cercle animé. Mesure disponible : la barre native garde sa vraie valeur.
   Le progress reste accessible pendant l’attente, même s’il est masqué visuellement. */
.export-indicator {
  margin: 20px 0;
  min-height: 28px;
  display: flex;
  align-items: center;
}
.export-spinner {
  display: none;
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: export-spin 1s linear infinite;
}
.export-indicator:has(progress:indeterminate:not([hidden])) .export-spinner {
  display: block;
}
.export-indicator:has(progress:indeterminate:not([hidden])) progress {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
#export-measure:empty,
#archive-measure:empty,
#archive-elapsed:empty {
  display: none;
}
@keyframes export-spin {
  to {
    transform: rotate(360deg);
  }
}
#export-step {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
}
#export-measure,
#archive-measure {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.guide {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  font-size: 16px;
  line-height: 1.75;
}
.guide a {
  color: var(--violet-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.guide .guide-intro {
  max-width: 750px;
  margin-bottom: 32px;
}
.guide h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.2;
  margin: 12px 0 20px;
  letter-spacing: -0.03em;
}
.guide h2 {
  font-size: 24px;
  line-height: 1.3;
  margin: 0 0 18px;
}
.guide h3 {
  font-size: 18px;
  line-height: 1.4;
  margin: 24px 0 10px;
}
.guide-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 32px;
}
.guide-nav a {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 8px 16px;
  background: var(--surface);
}
.guide section {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  margin-bottom: 20px;
  scroll-margin-top: 24px;
}
.guide li {
  padding-left: 6px;
  margin: 10px 0;
}
.guide .guide-note {
  padding: 16px 20px;
  border-left: 4px solid var(--violet);
  background: var(--violet-soft);
  border-radius: 0 10px 10px 0;
}
.guide details {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.guide summary {
  cursor: pointer;
  font-weight: 700;
}
.guide table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.guide th,
.guide td {
  padding: 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  white-space: normal;
}
.guide code {
  overflow-wrap: anywhere;
  font-size: 0.95em;
}
.guide-footer {
  font-size: 14px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .quick-steps {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .quick-steps li {
    padding: 14px;
  }
  .installation-help > summary span {
    display: block;
    margin: 6px 0 0;
  }
  .topbar-tools {
    flex-wrap: wrap;
    gap: 10px;
  }
  .guide {
    padding: 24px 12px;
  }
  .guide section {
    padding: 20px 16px;
  }
  .guide table {
    font-size: 14px;
  }
  .guide th,
  .guide td {
    padding: 8px 4px;
  }
  .help-link {
    font-size: 13px;
  }
}
@media (pointer: coarse) {
  button,
  .button,
  summary,
  .guide-nav a {
    min-height: 44px;
  }
  .help-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .guide {
    max-width: none;
    padding: 0;
    color: #000;
  }
  .guide section {
    break-inside: avoid;
    border: 0;
    border-bottom: 1px solid #bbb;
    padding: 16px 0;
  }
  .topbar,
  .guide-nav,
  .skip-link {
    display: none !important;
  }
  .guide a {
    color: #000;
  }
  .guide details > * {
    display: block !important;
  }
  .guide {
    background: #fff;
  }
  details::details-content {
    content-visibility: visible;
  }
}
