/* ============================================================
   Word Counter — tool-specific styles on base.css.
   No :root / theme; consumes base tokens only.
   ============================================================ */

.wc-tool { background: var(--bg); transition: background 0.5s; }
.wc-tool .tool-instructions-wrapper { text-align: center; margin-bottom: 24px; }
.wc-tool .tool-section-title {
    font-family: var(--font-head); font-weight: 800;
    font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--text);
    margin: 0 0 12px; letter-spacing: -0.3px;
}
.wc-tool .text-primary-red { color: var(--accent-2); }
.wc-tool .tool-section-texte {
    color: var(--text-muted); font-size: 0.95rem; line-height: 1.7;
    max-width: 720px; margin: 0 auto;
}

/* Layout: input left, stats right */
.wc-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 860px) { .wc-layout { grid-template-columns: 1fr; } }

/* Input */
.wc-input-panel {
    background: var(--panel-bg); border: 1px solid var(--panel-border);
    border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 16px;
}
.wc-input {
    width: 100%; box-sizing: border-box; min-height: 320px; resize: vertical;
    background: var(--card-bg); color: var(--text);
    border: 1.5px solid var(--border-color); border-radius: var(--radius-sm);
    padding: 16px; font-family: var(--font-head); font-size: 1rem; line-height: 1.7;
}
.wc-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(231,76,60,0.15); }
.wc-input-actions { display: flex; gap: 10px; margin-top: 12px; }
.wc-input-actions .spin-btn { margin: 0; }

/* Stats */
.wc-stats-panel { display: flex; flex-direction: column; gap: 18px; }
.wc-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wc-stat {
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); padding: 16px; text-align: center;
    display: flex; flex-direction: column; gap: 4px;
}
.wc-stat--primary { background: var(--gradient-result); border-color: transparent; }
.wc-stat--primary .wc-stat-num, .wc-stat--primary .wc-stat-label { color: #fff; }
.wc-stat--wide { grid-column: 1 / -1; }
.wc-stat-num { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 800; color: var(--text); word-break: break-word; }
.wc-stat-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* Keyword density */
.wc-density-panel {
    background: var(--panel-bg); border: 1px solid var(--panel-border);
    border-radius: var(--radius); padding: 18px;
}
.wc-density-title { font-family: var(--font-head); font-size: 1rem; font-weight: 800; color: var(--text); margin: 0 0 14px; }
.wc-density-list { display: flex; flex-direction: column; gap: 8px; }
.wc-density-empty { color: var(--text-muted); font-size: 0.88rem; margin: 0; font-style: italic; }
.wc-density-row { display: flex; align-items: center; gap: 10px; }
.wc-density-word { flex: 0 0 26%; font-size: 0.88rem; font-weight: 700; color: var(--text); word-break: break-word; }
.wc-density-bar { flex: 1; height: 8px; background: var(--card-bg); border-radius: 6px; overflow: hidden; }
.wc-density-fill { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--purple), var(--accent-2)); }
.wc-density-count { flex: 0 0 auto; font-family: var(--font-mono); font-size: 0.76rem; font-weight: 700; color: var(--text-muted); }

@media (max-width: 480px) {
    .wc-stats-grid { grid-template-columns: 1fr 1fr; }
    .wc-stat-num { font-size: 1.25rem; }
}