/* Presse : recherche dans les quotidiens, navigation par date, lecteur PDF et sommaire LLM. */

/* En-tête et recherche */
.presse-status { font-variant-numeric: tabular-nums; }
.presse-search { align-items: flex-end; gap: var(--space-3); padding: var(--space-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); }
.presse-search .field-search { flex: 1 1 260px; min-width: 220px; max-width: none; }
.presse-search .field { min-width: 120px; }
.presse-search select.input { max-width: 240px; }
.presse-search-actions { display: flex; gap: var(--space-2); align-items: center; min-height: 36px; }

/* Résultats */
.presse-results-head, .presse-results-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.presse-results-foot { margin-top: var(--space-4); justify-content: flex-end; }
.presse-results-count { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.presse-pager { display: flex; align-items: center; gap: var(--space-2); font-size: 13px; }
.presse-group { margin-bottom: var(--space-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); overflow: hidden; }
.presse-group-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-3) var(--space-4); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.presse-group-id { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.presse-group-une { flex: 0 0 auto; width: 40px; height: 56px; object-fit: cover; object-position: top; border: 1px solid var(--border); border-radius: 3px; background: #fff; }
.presse-group-head h2 { font-size: 15px; font-weight: 600; }
.presse-group-meta { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.presse-hits { list-style: none; margin: 0; padding: 0; }
.presse-hits li + li { border-top: 1px solid var(--border); }
.presse-hit {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--space-3); width: 100%; text-align: left;
  padding: var(--space-3) var(--space-4); border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; line-height: 1.5; cursor: pointer;
}
.presse-hit:hover { background: var(--hover); }
.presse-hit:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.presse-hit-page { color: var(--accent); font-size: 13px; padding-top: 2px; white-space: nowrap; }
.presse-hit-text { min-width: 0; overflow-wrap: anywhere; }
.presse-hit-text mark { background: var(--blue-subtle); color: var(--text); border-radius: 2px; padding: 0 1px; }

/* Navigation par dates et grille du jour */
.presse-browse { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.presse-month-nav { justify-content: space-between; margin-bottom: var(--space-2); }
.presse-month-nav h2 { min-width: 0; flex: 1; font-size: 15px; }
.presse-browse .date-list button { display: flex; justify-content: space-between; gap: var(--space-2); }
.presse-date-count { font-size: 12px; color: var(--text-muted); }
.presse-day { margin-bottom: var(--space-4); font-size: 18px; }
.presse-day .muted { font-size: 14px; font-weight: 400; }
.presse-family { margin-bottom: var(--space-6); }
.presse-family h3 { font-size: 13px; color: var(--text-2); margin-bottom: var(--space-2); letter-spacing: .04em; text-transform: uppercase; }
.presse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-3); }
.presse-card {
  display: flex; flex-direction: row; align-items: flex-start; gap: var(--space-3); min-width: 0;
  padding: var(--space-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: inherit; transition: border-color var(--duration) var(--ease), background-color var(--duration) var(--ease);
}
/* Une à gauche (vignette de la première page), logo en tête du texte (bandeau-titre de la une, toujours sur fond clair). */
.presse-card-une { flex: 0 0 104px; width: 104px; aspect-ratio: 5 / 7; object-fit: cover; object-position: top; border: 1px solid var(--border); border-radius: var(--radius-s, 4px); background: #fff; }
.presse-card-body { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; flex: 1; }
.presse-card-logo { width: 100%; height: 40px; object-fit: contain; object-position: left center; background: #fff; border-radius: var(--radius-s, 4px); margin-bottom: var(--space-1); }
.presse-card:hover { text-decoration: none; border-color: var(--border-strong); background: var(--surface-2); }
.presse-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.presse-card-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.presse-card-raw { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presse-card-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); margin-top: var(--space-1); font-size: 13px; color: var(--text-2); }

/* Fiche : lecteur et panneau latéral */
.presse-doc-head .breadcrumb .btn { margin-left: calc(-1 * var(--space-3)); }
.presse-doc-head .btn[hidden] { display: none; } /* « Reconnaître le texte » ou « Générer » selon l'état du numéro */
.presse-doc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(min(100%, 300px), 2fr); gap: var(--space-5); align-items: start; }
.presse-viewer-box { min-width: 0; background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.presse-viewer { display: block; width: 100%; height: calc(100vh - 170px); min-height: 560px; border: 0; background: var(--surface-3); }
.presse-side { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: var(--space-3) var(--space-4) var(--space-4); }
.presse-side .tabs { margin-bottom: var(--space-3); }
.presse-summary, .presse-text { max-height: calc(100vh - 290px); overflow: auto; font-size: 14px; line-height: 1.5; }

/* Sommaire */
.presse-progress { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); margin-bottom: var(--space-3); background: var(--info-soft); border-radius: var(--radius); font-size: 14px; }
.presse-progress-head { display: flex; justify-content: space-between; gap: var(--space-2); }
.presse-progress-msg { font-size: 13px; }
.presse-progress .btn { align-self: flex-start; }
.presse-summary-body > section { margin-top: var(--space-4); }
.presse-summary-body h3 { font-size: 13px; color: var(--text-2); letter-spacing: .04em; text-transform: uppercase; margin-bottom: var(--space-2); }
.presse-overview { font-size: 15px; line-height: 1.6; }
.presse-topics { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) 6px; }
.presse-topics li { font-size: 13px; padding: 2px 9px; }
.presse-highlights, .presse-sections { margin: 0; padding-left: var(--space-6); }
.presse-highlights li + li, .presse-sections li + li { margin-top: var(--space-2); }
.presse-article-title { font-weight: 500; }
.presse-article-page { color: var(--text-muted); font-size: 13px; }
.presse-article-sum { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.presse-page-link { background: none; border: 0; padding: 0; color: var(--accent-strong); font: inherit; text-align: left; cursor: pointer; }
.presse-page-link:hover { text-decoration: underline; }
.presse-page-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.presse-articles-page + .presse-articles-page { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.presse-articles-page h4 { font-size: 13px; font-weight: 600; margin-bottom: var(--space-1); }
.presse-articles-page ul { list-style: none; margin: 0; padding: 0; }
.presse-articles-page li + li { margin-top: var(--space-2); }
.presse-summary-foot { margin-top: var(--space-4); font-size: 12px; }

/* Texte de la page courante */
.presse-page-nav { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.presse-page-input { width: 72px; text-align: right; font-variant-numeric: tabular-nums; }
.presse-page-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font); font-size: 14px; line-height: 1.55; color: var(--text); }

@media (max-width: 1100px) {
  .presse-doc { grid-template-columns: minmax(0, 1fr); }
  .presse-viewer { height: 70vh; min-height: 360px; }
  .presse-summary, .presse-text { max-height: none; }
}
@media (max-width: 899px) {
  .presse-browse { grid-template-columns: minmax(0, 1fr); }
  .presse-hit { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .presse-search { padding: var(--space-3); }
}
/* Lecteur pdf.js (double page) */
.pdfv { display: flex; flex-direction: column; min-height: 400px; outline: none; background: var(--surface-3); }
.pdfv-bar { display: flex; align-items: center; gap: 4px; padding: 4px 6px; border-bottom: 1px solid var(--border); background: var(--surface); }
.pdfv-spacer { flex: 1; }
.pdfv-label { font-size: 12px; color: var(--text-2); min-width: 72px; text-align: center; }
.pdfv-pages { display: flex; justify-content: center; align-items: flex-start; gap: 8px; padding: 8px; overflow: auto; flex: 1; }
.pdfv-page { background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.25); max-width: 100%; height: auto; }
.pdfv:fullscreen { background: #111; }
.pdfv:fullscreen .pdfv-pages { height: calc(100vh - 36px); }
.pdfv-status { padding: var(--space-3); }
.pdfv-status.is-error { color: var(--danger); }
.presse-find-form { display: flex; gap: var(--space-2); margin-bottom: var(--space-2); }
.presse-find-form .input { flex: 1; }
