/* Widget calculateur embarquable — articles guides / blog */
.calc-widget-mount {
  margin: 28px 0 32px;
}

.calc-widget {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e2dc);
  border-radius: 14px;
  padding: 20px 22px 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .calc-widget {
  background: var(--surface, #1a1a1f);
  border-color: var(--border, #333);
}

.calc-widget-header {
  margin-bottom: 16px;
}

.calc-widget-header h3 {
  font-family: var(--font-display, 'Fraunces', serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text, #1a1a1a);
}

.calc-widget-header p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted, #666);
  line-height: 1.45;
}

.calc-widget-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px 14px;
  margin-bottom: 16px;
}

.calc-widget .cw-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-muted, #555);
}

.calc-widget .cw-field input,
.calc-widget .cw-field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--bg, #faf9f7);
  color: var(--text, #1a1a1a);
}

.calc-widget .cw-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.calc-widget .cw-bg-btn {
  padding: 6px 10px;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  background: var(--bg, #faf9f7);
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--text, #333);
}

.calc-widget .cw-bg-btn.active {
  background: var(--accent, #c45c26);
  border-color: var(--accent, #c45c26);
  color: #fff;
}

.calc-widget-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  padding: 14px;
  background: var(--bg-subtle, #f5f3ef);
  border-radius: 10px;
  margin-bottom: 14px;
}

[data-theme="dark"] .calc-widget-results {
  background: rgba(255, 255, 255, 0.04);
}

.calc-widget .cw-metric {
  text-align: center;
}

.calc-widget .cw-metric-val {
  font-family: var(--font-display, 'Fraunces', serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent, #c45c26);
  line-height: 1.2;
}

.calc-widget .cw-metric-val.pos { color: #1a7f4b; }
.calc-widget .cw-metric-val.neg { color: #b83232; }

.calc-widget .cw-metric-label {
  font-size: 0.72rem;
  color: var(--text-muted, #666);
  margin-top: 2px;
}

.calc-widget-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted, #777);
}

.calc-widget-footer a {
  font-weight: 600;
  color: var(--accent, #c45c26);
  text-decoration: none;
}

.calc-widget-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .calc-widget-fields {
    grid-template-columns: 1fr 1fr;
  }
  .calc-widget-results {
    grid-template-columns: 1fr 1fr;
  }
}
