/* =============================================================
   SEO dans l'éditeur d'article (src/ui/pages/siteweb-article.js) et fête de la publication
   (src/ui/seo-fete.js). Variables de app.css : le mode sombre suit tout seul.
   Classes préfixées « art- » ; animations brèves, coupées si l'appareil en demande moins.
   ============================================================= */

/* Pour les lecteurs d'écran seulement */
.art-cache { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Une règle « .sw-controle » plus loin dans app.css (liste des réglages) empilait l'icône au-dessus du texte */
.sw-controles .sw-controle { flex-direction: row; margin: 0; padding: 8px 10px; gap: 9px; font-size: .84rem; line-height: 1.45; }

/* Repères de lecture dans l'éditeur (phrases et paragraphes trop longs) : surlignés, sans vague */
.sw-cm .cm-repere.cm-repere-conseil { text-decoration: none; background: color-mix(in srgb, var(--orange) 15%, transparent); border-radius: 3px; }

/* Aperçu Google : les mots de la recherche en gras */
.sw-google-desc b { font-weight: 700; color: inherit; }

/* Zones de « Prêt à publier » : un mot, une couleur, une icône */
.zone-a_completer { --zc: var(--orange); --zt: var(--t-orange); --zb: var(--t-orange-bg); }
.zone-presque { --zc: var(--blue); --zt: var(--t-bleu); --zb: var(--t-bleu-bg); }
.zone-pret { --zc: var(--green); --zt: var(--t-vert); --zb: var(--t-vert-bg); }

.art-pret-mini { display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 999px; padding: 2px 8px; font: inherit; font-size: .68rem;
  font-weight: 700; background: var(--zb); color: var(--zt); cursor: pointer; white-space: nowrap; }
.art-pret-mini:hover { filter: brightness(.96); }

.art-pret { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 14px 10px; margin-bottom: 14px; }
.art-jauge { position: relative; width: min(230px, 100%); margin: 0 auto; }
.art-jauge > svg { display: block; width: 100%; height: auto; }
.art-jauge-fond { fill: none; stroke: var(--line-2); stroke-width: 14; stroke-linecap: round; }
.art-jauge-verte { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; opacity: .6; }
.art-jauge-val { fill: none; stroke: var(--zc); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 100 100;
  transition: stroke-dashoffset .6s ease, stroke .3s; animation: art-jauge-remplir .8s ease-out; }
@keyframes art-jauge-remplir { from { stroke-dashoffset: 100; } }
.art-jauge-texte { position: absolute; left: 0; right: 0; bottom: 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--zt); }
.art-jauge-texte strong { font-size: 1.02rem; font-weight: 800; }
.art-pret-phrase { margin: 8px 0 0; text-align: center; font-size: .84rem; line-height: 1.45; color: var(--text); }
.art-criteres { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 1px; }
.art-criteres li > button, .art-critere { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: 8px;
  font: inherit; font-size: .84rem; color: var(--ink); text-align: left; }
.art-criteres li > button { cursor: pointer; }
.art-criteres li > button:hover { background: var(--line-2); }
.art-criteres li.ok .art-critere { color: var(--muted); }
.art-critere-marque, .art-point-marque { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: 0 0 auto; }
.art-criteres li.ok .art-critere-marque, .art-point-marque.ok { background: var(--t-vert-bg); border-color: var(--green); color: var(--t-vert); }
.art-pret-aide { margin: 8px 8px 0; }

/* Recherche visée : chiffres connus, tendance, déjà traité */
.art-recherche { margin-top: 8px; display: grid; gap: 8px; }
.art-recherche-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.art-recherche-tete strong { color: var(--ink); font-size: .9rem; }
.art-recherche .en-savoir-plus { margin: 0; }
.art-recherche .sw-note a { color: inherit; text-decoration: underline; }
.art-chiffres { list-style: none; margin: 8px 0 6px; padding: 0; display: grid; gap: 4px; }
.art-chiffres li { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; }
.art-chiffres strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.art-tendance { display: flex; align-items: flex-end; gap: 3px; height: 44px; margin: 6px 0; }
.art-tendance span { flex: 1; min-width: 4px; background: color-mix(in srgb, var(--navy) 55%, transparent); border-radius: 3px 3px 0 0; }

/* Liens à ajouter */
.art-liens { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 6px; }
.art-liens > p { margin: 4px 0 6px; }
.art-liens-liste { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 6px; }
.art-liens-liste li { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.art-liens-liste li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.art-liens-liste strong { color: var(--ink); font-size: .84rem; }
.art-liens-liste small { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.art-liens code, .art-fete-code code { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: .72rem; color: var(--text); word-break: break-all; user-select: all; }
.art-liens-code { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 10px; background: var(--line-2); margin: 6px 0; }
.art-liens-code code { flex: 1; min-width: 0; }

/* Onglet « Idée » : la fiche de l'idée dont vient l'article */
.art-idee { display: grid; gap: 16px; }
.art-idee p { margin: 0; font-size: .86rem; line-height: 1.5; }
.art-idee p + p { margin-top: 4px; }
.art-idee .sw-sous-titre { margin: 0 0 4px; }
.art-idee-fort { font-weight: 700; color: var(--ink); }
.art-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.art-points > li { display: flex; gap: 8px; align-items: flex-start; font-size: .84rem; line-height: 1.45; }
.art-points > li > div { min-width: 0; }
.art-points .art-point-marque { width: 16px; height: 16px; margin-top: 1px; }
.art-points .lien { text-align: left; font-size: inherit; }
.art-points strong { color: var(--ink); font-weight: 600; }
.art-sous-questions { margin: 3px 0 0; padding-left: 16px; color: var(--muted); font-size: .78rem; }
.art-liste { margin: 0; padding-left: 18px; font-size: .84rem; line-height: 1.5; display: grid; gap: 2px; }
.art-touche blockquote { margin: 0 0 6px; padding: 8px 12px; border-left: 3px solid var(--violet); background: var(--t-violet-bg); border-radius: 0 10px 10px 0; font-size: .86rem; color: var(--ink); }
.art-touche .sw-note { margin-top: 8px; align-items: center; }
.art-touche .sw-note span { flex: 1; }

/* La fête de la publication */
.art-fete-voile { z-index: 120; }
.art-fete { position: relative; background: var(--card); border-radius: 22px; width: 100%; max-width: 480px; max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 26px 24px 18px; text-align: center; box-shadow: 0 30px 80px rgba(20, 22, 60, .3); animation: art-fete-entree .32s cubic-bezier(.2, .9, .3, 1.15) both; }
.art-fete-fermer { position: absolute; top: 12px; right: 12px; }
.art-fete-dessin { display: block; width: 112px; height: 112px; margin: 0 auto 6px; overflow: visible; }
.art-fete-fond { fill: var(--t-vert-bg); }
.art-fete-cercle { fill: none; stroke: var(--green); stroke-width: 4; stroke-dasharray: 100; stroke-dashoffset: 0; transform: rotate(-90deg); transform-origin: 60px 60px;
  animation: art-trace .6s ease-out .1s both; }
.art-fete-coche { fill: none; stroke: var(--t-vert); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 0;
  animation: art-trace .4s ease-out .55s both; }
.art-fete-petale { fill: var(--c); opacity: 0; transform-origin: 60px 60px; animation: art-petale 1s ease-out calc(.45s + var(--i) * 25ms) both; }
@keyframes art-trace { from { stroke-dashoffset: 100; } }
@keyframes art-petale {
  0% { opacity: 0; transform: rotate(var(--a)) translateY(-22px) scale(.4); }
  25% { opacity: .95; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(1); }
}
@keyframes art-fete-entree { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.art-fete h2 { font-size: 1.3rem; margin: 4px 0 6px; }
.art-fete-phrase { margin: 0 auto; max-width: 390px; color: var(--text); font-size: .92rem; line-height: 1.55; }
.art-fete-suite { margin-top: 18px; text-align: left; }
.art-fete-suite .sw-sous-titre { margin: 0 0 8px; }
.art-fete-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.art-fete-action .btn { white-space: normal; text-align: left; max-width: 100%; }
.art-fete-action { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.art-fete-action > div { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.art-fete-action strong { color: var(--ink); font-size: .88rem; }
.art-fete-action small { color: var(--muted); font-size: .78rem; line-height: 1.45; }
.art-fete-icone { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; }
.art-fete-liens { padding: 2px 4px 0 48px; display: grid; gap: 8px; }
.art-fete-liens .sw-note { margin: 0; }
.art-fete-liens ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.art-fete-liens li { display: flex; align-items: center; gap: 8px; }
.art-fete-liens li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.art-fete-liens strong { font-size: .84rem; color: var(--ink); }
.art-fete-liens small { color: var(--muted); font-size: .76rem; }
.art-fete-code { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 10px; background: var(--line-2); }
.art-fete-code code { flex: 1; min-width: 0; }
.art-fete-pied { display: flex; justify-content: center; margin-top: 16px; }

@media (max-width: 640px) {
  .art-fete { padding: 22px 16px 14px; border-radius: 18px; }
  .art-fete-liens { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .art-fete, .art-fete-cercle, .art-fete-coche, .art-jauge-val { animation: none; }
  .art-jauge-val { transition: none; }
  .art-fete-petale { display: none; }
}
