/* Composants de l'outil. Les couleurs et le chrome viennent de ../assets/site.css. */

.page-outil .masthead { position: static; }
.outil-intro {
  width: min(var(--cadre), calc(100% - 40px));
  margin: 18px auto 0;
}
.outil-intro .chapo { margin: 0; max-width: 62ch; color: var(--encre-douce); }
.outil {
  width: min(var(--cadre), calc(100% - 40px));
  margin: 12px auto 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: stretch;
}
.outil-principal { min-width: 0; }

.onglets {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--papier) 92%, transparent);
  backdrop-filter: blur(10px);
}
.onglets button {
  border-color: transparent;
  background: transparent;
  color: var(--encre-douce);
  min-height: 40px;
  box-shadow: none;
}
.onglets button:hover { filter: none; background: var(--accent-doux); }
.onglets button[aria-selected="true"] {
  background: var(--carte);
  color: var(--encre);
  border-color: var(--filet);
}
.onglets button[aria-selected="true"]:hover { background: var(--carte); }

.panneau {
  background: var(--carte);
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
  padding: 18px;
}
.panneau h2 { font-size: 1.45rem; }
.scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}
.tuile {
  border: 1px solid var(--filet);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--papier);
}
.tuile .v {
  font-variant-numeric: tabular-nums;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
}
.tuile .l { color: var(--encre-douce); font-size: 0.88rem; }
.tuile .mot, .pastille-mot {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--encre-douce);
}
.vert { color: var(--vert); }
.orange { color: var(--orange); }
.rouge { color: var(--rouge); }
.gris, .meta { color: var(--encre-douce); }
.meta { font-size: 0.92rem; }
.actions, .choix { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.choix button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--encre); }
.depot {
  display: block;
  border: 1.5px dashed var(--filet);
  border-radius: 12px;
  padding: 14px;
  color: var(--encre-douce);
  font-weight: 500;
  cursor: pointer;
  margin-top: 12px;
}
.depot .lien { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.depot.survol { border-color: var(--accent); background: var(--accent-doux); }
.rangee { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.avert {
  border-left: 4px solid var(--orange);
  background: color-mix(in srgb, var(--orange) 12%, var(--carte));
  padding: 10px 12px;
  border-radius: 8px;
  margin: 12px 0;
}
.vide { color: var(--encre-douce); }
.doc {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.75;
  background: var(--papier);
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0;
}
.doc p { margin: 0 0 0.8em; }
.doc .s { color: #1c1915; text-decoration: none; border-radius: 3px; padding: 0 1px; }
.ia { text-decoration: underline 2px var(--ia); text-underline-offset: 4px; }
.doc .gris, .legende .gris { text-decoration: underline 2px var(--orange); text-underline-offset: 4px; color: inherit; }
.alt { text-decoration: underline wavy 1.5px var(--rouge); text-underline-offset: 5px; }
.q { color: var(--cite); font-style: italic; }
.bib { opacity: 0.62; }
.badge {
  display: inline-block;
  font: 600 0.72rem var(--sans);
  border: 1px solid currentColor;
  border-radius: 99px;
  padding: 0 6px;
  margin-right: 4px;
  vertical-align: middle;
}
.b-ia { color: var(--ia); }
.b-gris { color: var(--orange); }
.legende {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 0;
  margin: 8px 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--encre-douce);
}
.pastille {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  border-radius: 3px;
  vertical-align: -1px;
  margin-right: 4px;
}
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--filet); vertical-align: top; }
.defil { overflow-x: auto; }
.cote-a-cote { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cote-a-cote > div, .suggestion, .passage, .candidat, .source-carte, .apercu-llm, .comparaison {
  border: 1px solid var(--filet);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0;
  background: var(--papier);
}
.cote-a-cote h4, .sous-titre { margin: 18px 0 6px; font-size: 1.15rem; }
.etiquette {
  display: inline-block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--encre-douce);
}
.avant-apres { background: var(--carte); border-radius: 8px; padding: 8px; }
.pistes { padding-left: 1.2rem; }
.pistes blockquote { margin: 4px 0 12px; color: var(--encre); }
.statut:empty { display: none; }
.statut { margin: 0 0 10px; }
.statut[data-etat="erreur"] { color: var(--rouge); }
details { margin-top: 16px; }
details summary { cursor: pointer; font-weight: 600; }
#fichier, .source-fichier { margin-top: 8px; max-width: 100%; }
.source-texte { min-height: 120px; }
#llm-consigne { min-height: 80px; }
#impression { position: absolute; width: 0; height: 0; border: 0; }
.apercu-rapport { width: 100%; min-height: 480px; border: 1px solid var(--filet); border-radius: 12px; background: #fff; }

@media (max-width: 900px) {
  .outil { grid-template-columns: 1fr; }
  .cote-a-cote { grid-template-columns: 1fr; }
}
@media print {
  .masthead, .onglets, .pied, .actions, .choix, .depot, .pub, .cookies { display: none !important; }
  .panneau { border: 0; }
  .outil { display: block; width: auto; }
}
