.frise-tool {
  min-width: 0;
}

.frise-list {
  margin: 0 0 1lh;
  padding: 0;
  list-style: none;
}

.frise-list li {
  margin: 0.5lh 0;
  overflow-wrap: anywhere;
}

.frise-list-action {
  height: 1lh;
}

.frise-tool textarea {
  min-height: 8lh;
}

.frise-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5lh 2ch;
  margin: 1lh 0 0;
}

.frise-graph {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 1lh 0;
}

.frise-graph svg {
  display: block;
  max-width: none;
}

.frise-vertical {
  margin: 1lh 0 1lh 1ch;
  padding: 0 0 0 2ch;
  border-left: 1px solid var(--line);
  list-style: none;
}

.frise-vertical-event {
  position: relative;
  display: grid;
  grid-template-columns: minmax(10ch, 18ch) minmax(0, 1fr);
  gap: 1ch;
  overflow-wrap: anywhere;
}

.frise-vertical-event::before {
  content: "";
  position: absolute;
  left: calc(-2ch - 3px);
  bottom: 0.5em;
  width: 5px;
  height: 5px;
  background: var(--text-dim);
}

.frise-vertical-date {
  color: var(--text-dim);
}

.frise-vertical-important {
  color: var(--accent);
  font-weight: 600;
}

.frise-heading {
  margin: 2lh 0 0.5lh;
  font-size: 1rem;
  font-weight: 600;
}

.frise-cards-link {
  display: inline-block;
  width: 2ch;
}

.frise-quiz-question,
.frise-quiz-score {
  min-height: 1lh;
  margin: 0.5lh 0;
  overflow-wrap: anywhere;
}

@media (max-width: 599px) {
  .frise-vertical-event {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .frise-cards-link {
    display: block;
    height: 0.5lh;
  }
}

@page {
  size: A4 landscape;
  margin: 10mm;
}

@media print {
  html,
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .document > .back-link,
  .frise-tool > :not(.frise-graph) {
    display: none !important;
  }

  .document {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .frise-tool > .frise-graph {
    display: block !important;
    width: 100%;
    max-width: none;
    margin: 0;
    overflow: visible;
  }

  .frise-graph svg {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  .frise-svg-background {
    fill: #fff;
  }

  .frise-svg-axis,
  .frise-svg-leader,
  .frise-svg-period {
    stroke: #000;
  }

  .frise-svg-tick,
  .frise-svg-label,
  .frise-svg-point,
  .frise-svg-important {
    fill: #000;
  }
}

/* Ajustement 2026-11-08 : au zoom de départ (960 px), la frise s'adapte à la largeur de la colonne ;
   les boutons + / − agrandissent au-delà et le cadre défile. */
.frise-tool svg[width="960"] {
  width: 100%;
  height: auto;
}
