/* Veille : digests par sujet, articles, sujets, préférences apprises */
.veille-page { margin-top: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); max-width: 1080px; }
.list-chip.paused { opacity: .65; }
.veille-topic-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); }
.veille-topic-head .muted { font-size: 13px; }
.veille-digest { display: flex; flex-direction: column; gap: var(--sp-3); }
.veille-digest + .veille-digest { margin-top: var(--sp-4); }
.veille-digest-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-3); }
.veille-digest-head .list-title { flex: none; }
.veille-digest-head .list-title a:hover { color: var(--prusse); }
.veille-digest-head .mono { font-size: 12px; }
.veille-synthesis { padding: var(--sp-3) var(--sp-4); font-size: 14px; line-height: 1.6; }
.veille-synthesis ul { margin: 0; padding-left: 18px; }
.veille-items.card { padding: 0 var(--sp-3); }
.veille-item { display: flex; align-items: flex-start; gap: var(--sp-3); padding: 12px 4px; }
.veille-item + .veille-item { border-top: 1px solid var(--trait); }
.vi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vi-title { font-weight: 500; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.vi-title:hover { color: var(--prusse); }
.vi-meta { font-size: 11.5px; color: var(--ardoise); }
.vi-summary { font-size: 13.5px; color: var(--ardoise); line-height: 1.5; }
.vi-actions { display: flex; gap: 2px; flex: none; }
.vi-actions form { display: contents; }
.vi-actions .mini-btn[aria-pressed="true"] { background: var(--surface-2); color: var(--graphite); }
.vi-up[aria-pressed="true"] { color: var(--succes) !important; }
.vi-down[aria-pressed="true"] { color: var(--erreur) !important; }
.veille-item.disliked .vi-body { opacity: .6; }
.veille-history .filters { margin-top: var(--sp-2); }
.veille-topics.card { padding: var(--sp-1) var(--sp-5); }
.veille-topics > li { flex-wrap: wrap; padding: var(--sp-4) 0; }
.veille-topics .name a:hover { color: var(--prusse); }
.veille-topics > li form { display: contents; }
.veille-form, .veille-prefs { max-width: 720px; }
.veille-prefs { margin-top: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.veille-prefs .list-title, .veille-digest-head .list-title { flex: none; }
.w-title .list-dot { margin-right: 7px; }
.veille-prefs .form-actions { margin-top: 0; flex-wrap: wrap; }
.veille-prefs .form-actions form { display: contents; }
.check-row { display: flex; align-items: center; gap: 8px; padding-top: 22px; font-size: 14px; }

/* Widget Veille : une carte par sujet, sa synthèse (les articles sont dans « Actualités ») */
.veille-w-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.veille-w-topics > li { padding: 10px 12px; border-radius: var(--r-ctrl); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--prusse); }
.veille-w-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; font-weight: 500; font-size: 13.5px; }
.veille-w-head a:hover { color: var(--prusse); }
.veille-w-head .mono { font-weight: 400; font-size: 11px; color: var(--ardoise); }
.veille-w-lines { margin: 6px 0 0; padding-left: 16px; font-size: 12.5px; line-height: 1.45; color: var(--ardoise); }
.veille-w-lines li + li { margin-top: 3px; }
.veille-w-none { margin-top: 4px; font-size: 12.5px; color: var(--ardoise); }

/* Options */
.veille-options { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); max-width: 720px; }
.veille-options .list-title { flex: none; }
.veille-options-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.veille-options-form .label { margin: 0; }
.veille-options-form .field { width: auto; min-width: 100px; }
.page-sub a { color: var(--prusse); }

/* Widget Actualités : l'article le mieux noté en tête, puis une liste aérée (titre, puis sujet · source · âge) */
.news-w { container-type: inline-size; }
.news-lead { padding: 12px 14px; margin-bottom: var(--sp-2); border-radius: var(--r-ctrl); background: var(--surface-2); }
.news-lead h3 a:hover, .news-title:hover { color: var(--prusse); text-decoration: underline; text-underline-offset: 3px; }
.news-lead h3 { font: 600 17px/1.3 var(--f-titre); letter-spacing: -0.01em; margin: 0 0 6px; overflow-wrap: anywhere; }

.news-summary { margin: 0 0 6px; font-size: 13.5px; line-height: 1.55; color: var(--graphite); }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 12px; color: var(--ardoise); }
.news-topic { padding: 1px 7px; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--trait); color: var(--graphite); font-size: 11px; }
.news-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; column-gap: var(--sp-5); }
.news-list li { display: flex; flex-direction: column; gap: 4px; padding: 10px 2px; border-top: 1px solid var(--trait); }
.news-list li:first-child { border-top: 0; }
.news-title { font-size: 14px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
@container (min-width: 600px) {
  .news-lead h3 { font-size: 19px; }
  .news-list { grid-template-columns: 1fr 1fr; }
  .news-list li:nth-child(2) { border-top: 0; }
}

/* « Thèmes » : choix des sujets affichés dans un widget de veille */
.topics-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.topics-btn svg.icon { width: 13px; height: 13px; }
.w-foot .topics-btn { margin-left: auto; }
.topics-pop h3 { margin-bottom: var(--sp-2); }
.topics-form { display: flex; flex-direction: column; gap: var(--sp-3); }
.topics-form .muted { font-size: 13px; }
.topics-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.topics-list label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.topics-form .form-actions { margin: 0; }

/* Source d'un article : site d'origine, règle (confiance / exclue) */
.vi-site { color: inherit; text-decoration: underline dotted; }
.vi-more { position: relative; }
.vi-more > summary { list-style: none; cursor: pointer; display: grid; place-items: center; font-weight: 700; }
.vi-more > summary::-webkit-details-marker { display: none; }
.vi-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: var(--sp-2) var(--sp-3); min-width: 220px; font-size: 13px; }
.vi-menu form { display: contents; }

/* À lire plus tard */
.reading-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.reading-list > li { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3) 0; border-top: 1px solid var(--trait); }
.reading-list > li:first-child { border-top: 0; }
.reading-list .grow { flex: 1; min-width: 0; }
.reading-list .r-title { font-weight: 500; overflow-wrap: anywhere; }
.reading-list .r-meta { font-size: 12px; color: var(--ardoise); }
.reading-list .r-summary { font-size: 13px; color: var(--graphite); margin-top: 2px; }
.reading-list li.read .r-title { color: var(--ardoise); font-weight: 400; }
.reading-list form { display: inline; }
.reading-add { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.reading-add .field { flex: 1; min-width: 220px; }
.source-rules { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.source-rules li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.source-rules form { display: inline; }

/* À lire plus tard : cartes lisibles */
.reading-group { display: flex; flex-direction: column; gap: var(--sp-2); }
.reading-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--sp-3); align-items: stretch; }
.reading-card { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; box-shadow: inset 0 3px 0 var(--c); }
.reading-card.read { opacity: .65; }
.reading-source { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ardoise); }
.reading-avatar { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: color-mix(in oklab, var(--c) 22%, transparent); color: var(--graphite); font: 700 12px/1 var(--f-titre); flex: none; }
.reading-title { font: 600 16.5px/1.35 var(--f-titre); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reading-title a:hover { text-decoration: underline; }
.reading-summary { font-size: 14px; line-height: 1.5; color: var(--graphite); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.reading-foot { display: flex; align-items: center; gap: var(--sp-2); margin-top: auto; padding-top: var(--sp-2); border-top: 1px solid var(--trait); font-size: 12.5px; }
.reading-foot .muted { margin-right: auto; }
.reading-foot form { display: inline; }
.reading-foot .btn { padding: 4px 10px; font-size: 13px; gap: 6px; }
.reading-foot svg.icon { width: 15px; height: 15px; }
/* Widget : titres plus grands, source en couleur */
.reading-w .r-title { font: 600 14px/1.35 var(--f-titre); }
.reading-w .r-meta { display: flex; align-items: center; gap: 6px; }
.reading-w .r-meta i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* Widget Veille : carrousel horizontal, un thème par carte, fondu entre deux cartes, flèches */
.veille-carousel { display: flex; flex-direction: column; gap: var(--sp-2); }
.vc-track { display: flex; align-items: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; transition: opacity .22s ease, height .25s ease; }
.vc-track::-webkit-scrollbar { display: none; }
.vc-track.is-fading { opacity: 0; }
.vc-slide { flex: 0 0 100%; scroll-snap-align: start; padding: 12px 14px; border-radius: var(--r-ctrl); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--prusse); min-width: 0; box-sizing: border-box; }
.vc-slide .veille-w-head { font-size: 14.5px; }
.vc-slide .veille-w-lines { font-size: 13px; }
.vc-nav { display: flex; align-items: center; justify-content: center; gap: 8px; }
.vc-nav .mini-btn { display: inline-grid; place-items: center; }
.vc-dots { display: inline-flex; align-items: center; gap: 6px; max-width: 60%; overflow: hidden; }
.vc-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px; background: var(--trait); cursor: pointer; transition: background .2s, width .2s; }
.vc-dot[aria-current="true"] { width: 18px; background: var(--prusse); }
.vc-counter { font-size: 11.5px; color: var(--ardoise); min-width: 28px; text-align: center; }
.vc-intervals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-2); }
.vc-intervals form { display: contents; }
@media (prefers-reduced-motion: reduce) { .vc-track { transition: none; } }

/* Ordre des sujets : monter / descendre */
.topic-order { display: inline-flex; flex-direction: column; gap: 2px; margin-right: 4px; }
.topic-order form { display: contents; }
.topic-order .mini-btn { display: grid; place-items: center; width: 24px; height: 20px; }
.topic-order .mini-btn:disabled { opacity: .3; cursor: default; }

/* Réglages du widget Veille : cachés derrière un engrenage */
.widget-gear { margin-left: auto; display: inline-grid; place-items: center; }
.widget-settings { max-width: 340px; }
.settings-rule { border: 0; border-top: 1px solid var(--trait); margin: var(--sp-3) 0; }
.topics-inline h3 { margin-top: 0; }

/* À lire : vidéos avec miniature (YouTube) et articles */
.reading-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-ctrl); overflow: hidden; background: var(--surface-2); }
.reading-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.reading-thumb:hover img { transform: scale(1.03); }
.reading-play { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgb(0 0 0 / .55); backdrop-filter: blur(4px); }
.reading-play svg.icon { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.reading-kind { margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--trait); color: var(--ardoise); }
.reading-list .r-thumb { flex: none; width: 72px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.reading-list .r-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-sources { padding: 4px 10px; font-size: 12.5px; gap: 6px; }

/* Lecteur d'article : une page à part, texte seulement, aérée et confortable à lire */
.reader-page { max-width: 780px; margin: var(--sp-5) auto var(--sp-7); padding: 0 var(--sp-4); }
.reader { display: flex; flex-direction: column; gap: var(--sp-5); padding: var(--sp-7) var(--sp-7) var(--sp-6); }
.reader-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ardoise); margin: 0 0 var(--sp-2); }
.reader-head h1 { font: 600 30px/1.25 var(--f-titre); letter-spacing: -0.015em; margin: 0; overflow-wrap: anywhere; }
.reader-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--trait); }
.reader-actions form { display: contents; }
.reader-body { font-size: 17.5px; line-height: 1.8; max-width: 68ch; }
.reader-body p { margin: 0 0 var(--sp-4); overflow-wrap: anywhere; }
.reader-body h2 { font: 600 21px/1.35 var(--f-titre); margin: var(--sp-6) 0 var(--sp-3); }
.reader-body blockquote { margin: 0 0 var(--sp-4); padding: var(--sp-1) 0 var(--sp-1) var(--sp-4); border-left: 3px solid var(--ambre); color: var(--graphite); font-style: italic; }
.reader-body .reader-li { position: relative; padding-left: 22px; margin-bottom: var(--sp-2); }
.reader-body .reader-li::before { content: "•"; position: absolute; left: 6px; color: var(--ardoise); }
.reader-body .reader-figure { margin: var(--sp-5) 0; }
.reader-body .reader-figure img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; border-radius: var(--r-ctrl); background: var(--surface-2); }
.reader-body .reader-figure figcaption { margin-top: var(--sp-2); font-size: 13px; line-height: 1.5; color: var(--ardoise); }
.reader-paywall { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-ctrl); background: var(--surface-2); border-left: 3px solid var(--ambre); }
.reader-paywall p { margin: 0; font-size: 14px; line-height: 1.5; }
.reader-paywall-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.reader-feedback { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; }
.reader-feedback form { display: contents; }
.reader-feedback .mini-btn { width: 36px; height: 36px; }
.reader-feedback .mini-btn[aria-pressed="true"] { background: var(--surface-2); }
.reader-foot, .reader-fail { font-size: 13px; margin: 0; }
.reader-fail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: var(--sp-4); border-radius: var(--r-ctrl); background: var(--surface-2); }
.reader-summary { margin: 0; font-size: 16px; line-height: 1.7; }
.reader-bottom { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding-top: var(--sp-4); border-top: 1px solid var(--trait); }
@media (max-width: 767px) { .reader { padding: var(--sp-5) var(--sp-4); } .reader-head h1 { font-size: 24px; } .reader-body { font-size: 16.5px; } }
