/* Référencement local (seo.js) : bilan, mots-clés, description, site web. Classes préfixées « seo- ». */
.seo { display: grid; gap: 12px; }
.seo > .carte + .carte { margin-top: 0; }
.seo-intro p { max-width: 70ch; }
.seo-intro .carte-titre { margin-bottom: 6px; }
.seo-intro + .carte, .seo-intro + .seo-attente, .seo-intro + .seo-tete { margin-top: 12px; }

/* Tons : bon / moyen / faible / non mesuré */
.seo-bon { --seo-c: #1F7A3D; --seo-f: #E3F2E8; }
.seo-moyen { --seo-c: #A86F12; --seo-f: #FCF0D9; }
.seo-faible { --seo-c: #B42318; --seo-f: #FDECEA; }
.seo-neutre { --seo-c: #9A9A9A; --seo-f: var(--trait); }

/* Jauge ronde de la note */
.seo-tete { display: flex; align-items: center; gap: 18px; }
.seo-tete > div { min-width: 0; }
.seo-tete .carte-titre { margin-bottom: 4px; }
.seo-tete p + p { margin-top: 4px; }
.seo-jauge { --p: 0; flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--seo-c) calc(var(--p) * 1%), var(--trait) 0); }
.seo-jauge.grande { width: 96px; height: 96px; }
.seo-jauge > span { width: calc(100% - 14px); height: calc(100% - 14px); border-radius: 50%; background: var(--carte);
  display: grid; place-items: center; align-content: center; line-height: 1.05; }
.seo-jauge b { font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--encre); }
.seo-jauge.grande b { font-size: 1.75rem; }
.seo-jauge small { font-size: .6875rem; font-weight: 700; color: var(--encre-3); }

/* Piliers */
.seo-piliers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.seo-piliers .carte + .carte { margin-top: 0; }
.seo-pilier { display: flex; flex-direction: column; gap: 8px; }
.seo-pilier-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.seo-pilier h3 { font-size: 1rem; font-weight: 750; margin: 0; }
.seo-pilier-note { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--seo-c); white-space: nowrap; }
.seo-pilier-note small { font-size: .75rem; font-weight: 700; color: var(--encre-3); }
.seo-barre { display: block; height: 8px; border-radius: 999px; background: var(--trait); overflow: hidden; }
.seo-barre > span { display: block; height: 100%; width: calc(var(--p, 0) * 1%); background: var(--seo-c); border-radius: inherit; }
.seo-pilier-resume { font-size: .9375rem; }
.seo-mesures { display: grid; gap: 4px; margin: 0; font-size: .875rem; }
.seo-mesures > div { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--trait); padding-top: 4px; }
.seo-mesures dt { color: var(--encre-2); }
.seo-mesures dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.seo-poids { margin-top: auto; font-size: .75rem; color: var(--encre-3); }

/* Actions classées */
.seo-actions { list-style: none; counter-reset: seo; margin: 10px 0 0; padding: 0; }
.seo-actions li { counter-increment: seo; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 6px 12px; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--trait); }
.seo-actions li::before { content: counter(seo); width: 26px; height: 26px; border-radius: 50%; background: var(--accent-doux);
  display: grid; place-items: center; font-size: .8125rem; font-weight: 750; }
.seo-actions p { font-size: .9375rem; }
.seo-gain { font-size: .75rem; font-weight: 700; color: #1F7A3D; }
@media (max-width: 560px) {
  .seo-actions li { grid-template-columns: 28px minmax(0, 1fr); }
  .seo-actions li > .btn { grid-column: 2; justify-self: start; }
}

/* Attente */
.seo-attente { display: flex; align-items: center; gap: 12px; }
.seo-roue { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--trait); border-top-color: var(--encre); animation: seo-tourne 1s linear infinite; }
@keyframes seo-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .seo-roue { animation-duration: 3s; } }

/* Mots-clés */
.seo-legende { margin: 8px 0 12px; padding-left: 18px; font-size: .875rem; display: grid; gap: 2px; }
.seo-filtres { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.seo-filtre { min-height: 36px; padding: 0 12px; border: 1px solid var(--trait); border-radius: 999px; background: #fff; font-weight: 650;
  font-size: .8125rem; color: var(--encre-2); cursor: pointer; }
.seo-filtre[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: #fff; }
.seo-table-zone { overflow-x: auto; }
.seo-mots { width: 100%; border-collapse: collapse; font-size: .875rem; }
.seo-mots th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--encre-3); padding: 8px; border-bottom: 1px solid var(--trait); }
.seo-mots td { padding: 10px 8px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.seo-mots tr:last-child td { border-bottom: 0; }
.seo-mots tr.seo-important td:first-child { box-shadow: inset 3px 0 0 var(--encre); }
.seo-col-mot strong { overflow-wrap: anywhere; }
.seo-col-nb { white-space: nowrap; font-variant-numeric: tabular-nums; }
.seo-col-actions { text-align: right; }
.seo-col-actions .btn { margin: 0 0 4px 4px; white-space: nowrap; }
.seo-etiquette { display: inline-block; margin: 2px 0 0 6px; padding: 1px 7px; border-radius: 999px; background: var(--encre); color: #fff;
  font-size: .6875rem; font-weight: 700; vertical-align: 1px; }
.seo-etiquette.gris { background: var(--trait); color: var(--encre-2); }
.seo-source { display: inline-block; margin: 0 4px 2px 0; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 650; white-space: nowrap; }
.seo-src-google { background: #E9EEF8; color: #2E4A85; }
.seo-src-suggestion { background: #FCF0D9; color: #7A5210; }
.seo-src-avis { background: #E1F3EF; color: #1F6157; }
.seo-presence { display: flex; flex-wrap: wrap; gap: 3px; }
.seo-champ { padding: 1px 6px; border-radius: 6px; font-size: .6875rem; font-weight: 650; color: #A3A3A3; border: 1px dashed #CFCFCF; }
.seo-champ.oui { color: #fff; background: #1F7A3D; border: 1px solid #1F7A3D; }
.seo-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.seo-vide { padding: 12px 0; }
/* Téléphone : une carte par mot-clé au lieu du tableau */
@media (max-width: 720px) {
  .seo-mots thead { display: none; }
  .seo-mots, .seo-mots tbody, .seo-mots tr, .seo-mots td { display: block; width: 100%; }
  .seo-mots tr { padding: 12px 0; border-bottom: 1px solid var(--trait); }
  .seo-mots tr:last-child { border-bottom: 0; }
  .seo-mots tr.seo-important td:first-child { box-shadow: none; }
  .seo-mots td { border: 0; padding: 3px 0; }
  .seo-mots td[data-lib]::before { content: attr(data-lib); display: block; font-size: .6875rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--encre-3); margin-bottom: 2px; }
  .seo-col-nb { white-space: normal; }
  .seo-col-actions { text-align: left; padding-top: 8px; }
  .seo-col-actions .btn { margin: 0 6px 6px 0; }
}

/* Description */
.seo-deux { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; align-items: start; }
.seo-deux .carte + .carte { margin-top: 0; }
@media (max-width: 860px) { .seo-deux { grid-template-columns: minmax(0, 1fr); } }
.seo-sous-titre { font-size: 1rem; font-weight: 750; margin: 0 0 10px; display: flex; justify-content: space-between; gap: 8px; }
.seo-sous-titre .muted { font-size: .8125rem; font-weight: 600; }
.seo-texte-actuel { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9375rem; }
.seo-puces { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.seo-puce { min-height: 36px; padding: 4px 12px; border: 1px solid var(--trait); border-radius: 999px; background: #fff; font-size: .8125rem;
  font-weight: 650; color: var(--encre-2); cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.seo-puce[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: #fff; }
.seo-puce[aria-pressed="true"]::before { content: "✓ "; }
.seo-consigne input { width: 100%; }
.seo-deux textarea { width: 100%; min-height: 190px; }
.seo-alertes { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; font-size: .875rem; }
.seo-alertes li { padding: 8px 10px; border-radius: 10px; }
.seo-alertes li.seo-probleme { background: var(--rouge-doux); color: #7A1A12; }
.seo-alertes li.seo-ameliorer { background: var(--ambre-doux); color: #6B4A0E; }
.seo-ok-txt { color: #1F7A3D; font-weight: 650; font-size: .875rem; margin-bottom: 6px; }
.seo-apercu { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Site web */
.seo-url { overflow-wrap: anywhere; font-size: .875rem; }
.seo-note-bas { margin-top: 8px; font-size: .8125rem; }
.seo-compte { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.seo-pastille { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.seo-pastille.seo-ok { background: #E3F2E8; color: #1F6B37; }
.seo-pastille.seo-ameliorer { background: var(--ambre-doux); color: #6B4A0E; }
.seo-pastille.seo-probleme { background: var(--rouge-doux); color: #7A1A12; }
.seo-controles { list-style: none; margin: 0; padding: 0; }
.seo-controles li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--trait); }
.seo-controles li:first-child { border-top: 0; padding-top: 0; }
.seo-controles .seo-pastille { justify-self: start; margin-top: 2px; }
.seo-controles h3 { font-size: .9375rem; font-weight: 750; margin: 0 0 2px; }
.seo-controles p { font-size: .9rem; }
.seo-detail { font-size: .8125rem; margin-top: 2px; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .seo-tete { flex-direction: column; align-items: flex-start; gap: 12px; }
  .seo-controles li { grid-template-columns: minmax(0, 1fr); }
}
.seo-deux .actions + .champ { margin-top: 14px; }
