/* ============================================
   LinkedIn Format Pro - Analyse de stats (page /outils/analyse-stats/)
   Variables du site uniquement : le mode sombre s'applique tout seul.
   ============================================ */
.st-drop { display: grid; gap: var(--space-xs); justify-items: center; text-align: center; padding: var(--space-xl) var(--space-lg); border: 2px dashed var(--color-primary); border-radius: var(--radius-xl); background: var(--bg-secondary); cursor: pointer; }
.st-drop.is-over { background: var(--color-primary-bg); border-style: solid; }
.st-drop:focus-within { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.st-drop strong { font-size: var(--font-size-lg); color: var(--text-primary); }
.st-drop span { color: var(--text-secondary); font-size: var(--font-size-sm); }
.st-drop { min-width: 0; overflow: hidden; }
.st-drop > * { max-width: 100%; min-width: 0; }
.st-drop input[type="file"] { width: 100%; box-sizing: border-box; font: inherit; color: var(--text-secondary); }
.st-status { min-height: 1.5em; margin: var(--space-sm) 0 0; font-size: var(--font-size-sm); color: var(--text-secondary); }
.st-status.is-error { color: var(--color-danger); font-weight: 700; }
.st-privacy { font-size: var(--font-size-sm); color: var(--text-secondary); margin: var(--space-sm) 0 0; }

.st-results { display: grid; gap: var(--space-lg); max-width: var(--max-content-width); margin: 0 auto; padding: 0 var(--gutter-width) var(--space-xl); }
.st-results[hidden] { display: none; }
.st-period { margin: 0; color: var(--text-secondary); font-weight: 600; }
.st-card { background: var(--color-white); border: 1px solid var(--border-medium); border-radius: var(--radius-xl); padding: var(--space-lg); min-width: 0; }
.st-card h2 { font-size: var(--font-size-lg); margin: 0 0 var(--space-md); text-align: left; }
.st-card h3 { font-size: var(--font-size-base); margin: 0 0 var(--space-xxs); }
.st-card h4 { font-size: var(--font-size-sm); margin: var(--space-sm) 0 0; color: var(--text-secondary); }

.st-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); }
.st-kpi { display: grid; gap: var(--space-xxs); padding: var(--space-md); border-radius: var(--radius-lg); background: var(--color-primary-bg); border-left: 5px solid var(--color-primary); }
.st-kpi-label { font-size: var(--font-size-sm); color: #1d4d2b; font-weight: 600; }
.st-kpi-value { font-size: 1.6rem; color: #0f3d1d; line-height: 1.1; overflow-wrap: anywhere; }
:root[data-theme="dark"] .st-kpi { background: var(--tint-green, #16331f); }
:root[data-theme="dark"] .st-kpi-label { color: #a9cdb4; }
:root[data-theme="dark"] .st-kpi-value { color: #ffffff; }

.st-insights { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-sm); }
.st-insight { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-sm); padding: var(--space-md); border: 1px solid var(--border-light); border-radius: var(--radius-lg); }
.st-insight p { margin: 0 0 var(--space-xxs); color: var(--text-secondary); }
.st-insight .st-action { color: var(--color-primary-dark); font-weight: 700; margin: 0; }
:root[data-theme="dark"] .st-insight .st-action { color: #6fd18b; }
.st-badge { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 800; color: #fff; background: #5b7a8c; }
.is-good .st-badge { background: #1b7a38; }
.is-warn .st-badge { background: #b36b00; }
.st-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.st-chart svg { width: 100%; height: auto; display: block; background: var(--bg-secondary); border-radius: var(--radius-md); }
.st-area { fill: rgba(27, 122, 56, 0.18); }
.st-line { fill: none; stroke: #1b7a38; stroke-width: 3; stroke-linejoin: round; }
:root[data-theme="dark"] .st-line { stroke: #6fd18b; }
.st-caption { margin: var(--space-xs) 0 0; color: var(--text-secondary); font-size: var(--font-size-sm); }

.st-bar { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3.5rem; align-items: center; gap: var(--space-xs); margin-bottom: var(--space-xxs); font-size: var(--font-size-sm); }
.st-bar-track { height: 14px; border-radius: 7px; background: var(--bg-tertiary); overflow: hidden; }
.st-bar-fill { display: block; height: 100%; background: #8fbf9d; border-radius: 7px; }
.st-bar.is-best .st-bar-fill { background: #1b7a38; }
.st-bar.is-best .st-bar-label { font-weight: 800; }
.st-bar-value { text-align: right; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.st-toplist { margin: 0; padding-left: 1.4rem; display: grid; gap: var(--space-xxs); }
.st-toplist a { color: var(--color-primary-dark); font-weight: 600; }
:root[data-theme="dark"] .st-toplist a { color: #6fd18b; }

.st-export { background: var(--color-primary-bg); border-color: var(--color-primary); }
:root[data-theme="dark"] .st-export { background: var(--tint-green, #16331f); }
.st-export textarea { width: 100%; min-height: 220px; box-sizing: border-box; padding: var(--space-sm); font: inherit; line-height: 1.5; border: 1px solid var(--border-medium); border-radius: var(--radius-md); background: var(--color-white); color: var(--text-primary); resize: vertical; }
.st-signed { font-size: var(--font-size-sm); color: var(--text-secondary); margin: var(--space-sm) 0 0; }

.st-tablewrap { overflow-x: auto; }
.st-table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); font-variant-numeric: tabular-nums; }
.st-table th, .st-table td { padding: var(--space-xxs) var(--space-xs); text-align: right; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
.st-table th:first-child, .st-table td:first-child { text-align: left; }
.st-table thead th { background: var(--color-primary-bg); color: var(--text-primary); }
.st-heat { width: 100%; min-width: 560px; height: auto; display: block; }
.st-heat-m { font-size: 9px; fill: var(--text-secondary); }
.st-h0 { fill: #e6ece8; } .st-h1 { fill: #cfe5d6; } .st-h2 { fill: #9fcdae; } .st-h3 { fill: #5faa78; } .st-h4 { fill: #2f8a4d; } .st-h5 { fill: #145c2b; }
:root[data-theme="dark"] .st-h0 { fill: #2a302c; } :root[data-theme="dark"] .st-h1 { fill: #24472f; } :root[data-theme="dark"] .st-h2 { fill: #2f6b42; } :root[data-theme="dark"] .st-h3 { fill: #3f9a5c; } :root[data-theme="dark"] .st-h4 { fill: #5fc17f; } :root[data-theme="dark"] .st-h5 { fill: #9be3b3; }
.st-brand { display: grid; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.st-brand input[type="file"] { max-width: 100%; }
.st-brand input[type="color"] { width: 56px; height: 36px; padding: 0; border: 1px solid var(--border-medium); border-radius: var(--radius-md); background: none; }
@media (min-width: 720px) { .st-brand { grid-template-columns: 2fr 1fr; } }

@media (min-width: 720px) {
  .st-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .st-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); }
}
