/* Outils gratuits (/outils/) : complète /blog/assets/blog.css, chargé avant.
   L'outil passe en premier (utilisable sans défiler à 375 px), le texte suit,
   avec les mêmes composants que les articles. */

/* ── En-tête de page : plus compact que celui d'un article ── */
.tool-hero { padding: 20px 0 8px; }
.tool-hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.08; margin-bottom: 10px; }
.tool-lead { font-size: 16px; color: var(--text-sub); margin-bottom: 16px; }
.tool-hero .breadcrumb { padding-top: 0; margin-bottom: 12px; }
.tool-page .breadcrumb { padding-top: 16px; }

/* ── Carte de l'outil ── */
.tool-card { background: var(--bg-card); border-radius: 14px; padding: 18px; margin-bottom: 8px; }
.tool-form { display: grid; gap: 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.tool-grid .span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label, .field .label { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; }
.field .hint { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.field input[type="text"], .field select {
  width: 100%; min-width: 0; height: 44px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-med); border-radius: 10px; appearance: none; -webkit-appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--text-sub) 50%), linear-gradient(135deg, var(--text-sub) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.field input[type="text"]:focus-visible, .field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field input[aria-invalid="true"] { border-color: var(--red); }
.field .error { font-size: 12px; color: var(--red); font-weight: 600; }
.field .error:empty { display: none; }

/* Choix segmenté (plateforme, type de vues) : de vrais boutons radio, stylés */
.segmented { border: 0; min-width: 0; }
.segmented legend { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; padding: 0; }
.segmented .options { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented label { position: relative; display: inline-flex; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border-med); font-size: 14px; font-weight: 600; color: var(--text-sub); cursor: pointer; }
.segmented input:checked + span { background: #080A0F; border-color: #080A0F; color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Curseur (RPM TikTok) */
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); height: 32px; }
.range-row output { font-weight: 700; font-size: 16px; color: var(--text); min-width: 72px; text-align: right; }

.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 20px; border-radius: 14px; border: 0; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--gold); color: #080A0F; }
.btn-primary:hover { background: #B8955F; }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border-med); }
.btn-secondary:hover { background: var(--bg-card-hover); }
.btn-dark { background: #080A0F; color: var(--gold) !important; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }

/* ── Résultats ── */
.results { margin-top: 16px; display: grid; gap: 10px; }
.results[hidden] { display: none; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.result-card { background: var(--bg); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.result-card.is-main { background: #080A0F; color: #fff; }
.result-card.is-main .result-label, .result-card.is-main .result-detail { color: #D9D6CF; }
.result-card.is-main .result-value { color: var(--gold); }
.result-label { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.result-value { font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--text); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.result-value.is-empty { font-size: 18px; color: var(--text-muted); font-weight: 600; }
.result-detail { font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }
.result-note { font-size: 14px; color: var(--text-sub); background: var(--bg); border-radius: 12px; padding: 12px 14px; margin: 0; }
.result-note strong { color: var(--text); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; line-height: 1.35; background: var(--accent-dim); color: var(--accent); margin-top: 6px; }
.badge.is-low { background: #F8E9E7; color: var(--red); }
.badge.is-high { background: #E6F0E4; color: #2F5E2A; }
.check-list { list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--text-sub); }
.check-list li { padding-left: 24px; position: relative; }
.check-list li::before { content: "•"; position: absolute; left: 8px; color: var(--text-muted); }
.check-list li.ok::before { content: "✓"; left: 4px; color: #2F5E2A; font-weight: 700; }
.check-list li.ko::before { content: "✗"; left: 4px; color: var(--red); font-weight: 700; }
.privacy-note { font-size: 12px; color: var(--text-muted); margin: 12px 0 0; }

/* ── Générateur de hooks ── */
.hook-list { list-style: none; display: grid; gap: 10px; }
.hook-item { background: var(--bg); border-radius: 12px; padding: 14px 16px; display: grid; gap: 8px; }
.hook-meta { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.hook-text { font-size: 17px; line-height: 1.45; color: var(--text); margin: 0; overflow-wrap: anywhere; }
.hook-text mark { background: var(--accent-dim); color: var(--accent); border-radius: 4px; padding: 0 3px; }
.hook-item .btn { justify-self: start; }
.tool-after { margin-top: 14px; }
.tool-after .hint { font-size: 13px; color: var(--text-muted); flex: 1 1 200px; }
.result-note:empty { display: none; }
.related-more { margin: 20px 0 0; }

/* ── Corps de page (sous l'outil) ── */
.tool-page .article-body { padding-top: 40px; }
.article-body > p.formula, .formula { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; background: var(--bg-card); border-radius: 10px; padding: 12px 14px; margin: 0 0 20px; color: var(--text); overflow-wrap: anywhere; }

/* ── Hub : liste des outils ── */
.tool-list { list-style: none; display: grid; gap: 14px; margin: 8px 0 24px; padding: 0; }
.tool-list li { margin: 0; }
.tool-link { display: block; background: var(--bg-card); border-radius: 14px; padding: 18px 20px; text-decoration: none !important; color: var(--text); }
.tool-link:hover { background: var(--bg-card-hover); }
.tool-link h2 { font-size: 20px !important; margin: 0 0 6px; }
.tool-link p { margin: 0; font-size: 15px; color: var(--text-sub); font-family: var(--sans); }
.tool-link .go { display: inline-block; margin-top: 10px; font-weight: 600; font-size: 14px; color: var(--accent); }

/* ── Pied de page : le lien « Gérer les cookies » est géré par /consent.js ── */
@media (max-width: 600px) {
  .tool-card { padding: 14px; margin-left: -4px; margin-right: -4px; }
  .tool-grid { gap: 10px; }
  .result-value { font-size: 24px; }
  .tool-lead { font-size: 15px; margin-bottom: 12px; }
}
@media (max-width: 360px) {
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
}
