/* ── Salaire calculator page styles ── */

.calc-page {
  min-height: 100vh;
  padding: 2rem 1.25rem 4rem;
}
.calc-page__inner {
  max-width: 960px;
  margin: 0 auto;
}
.calc-breadcrumb {
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}
.calc-breadcrumb a {
  color: var(--fg-muted);
  text-decoration: none;
}
.calc-breadcrumb a:hover { color: var(--fg); }

.calc-header { margin-bottom: 2.5rem; }
.calc-header h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 0.6rem;
}
.calc-header p {
  color: var(--fg-muted);
  font-size: 1rem;
  max-width: 560px;
}

.calc-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Inputs panel */
.calc-inputs {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
}
.calc-inputs__section-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}
.form-field { margin-bottom: 1.1rem; }
.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 0.35rem;
}
.form-field input[type="number"],
.form-field select {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
  background: var(--bg);
  appearance: none;
  transition: border-color 0.15s;
}
.form-field input[type="number"]:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.toggle-group {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.toggle-group button {
  flex: 1;
  padding: 0.6rem;
  border: none;
  background: var(--bg);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.toggle-group button.active {
  background: var(--accent);
  color: #1A1A1A;
}
.toggle-group button:not(:last-child) {
  border-right: 1.5px solid var(--border);
}

/* Results */
.calc-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.result-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
}
.result-card--highlight {
  background: var(--fg);
  border-color: var(--fg);
  color: white;
}
.result-card__label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 0.4rem;
}
.result-card--highlight .result-card__label { color: #A8A29E; }
.result-card__main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.result-card__amount {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--green);
}
.result-card--highlight .result-card__amount { color: var(--accent); }
.result-card__annual {
  font-size: 0.82rem;
  color: var(--fg-muted);
}
.result-card--highlight .result-card__annual { color: #A8A29E; }

/* Cotisations */
.cotisations-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.cotisations-card__header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cotisations-card__title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
}
.cotisations-card__total {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--fg-muted);
}
.cotisations-list { list-style: none; }
.cotisations-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
}
.cotisations-list li:last-child { border-bottom: none; }
.cotisations-list .charge-label { color: var(--fg-muted); }
.cotisations-list .charge-amount {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
}

/* IR row */
.ir-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ir-card__label {
  font-size: 0.78rem;
  color: var(--fg-muted);
  margin-bottom: 0.2rem;
}
.ir-card__value {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}
.ir-card__rate {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--accent-dark);
}

/* Cout employeur */
.employer-card {
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.employer-card__label {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 0.2rem;
}
.employer-card__sub {
  font-size: 0.72rem;
  color: #B5AEA0;
  margin-top: 0.15rem;
}
.employer-card__amount {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Explainer accordion */
.explainer {
  margin-top: 2.5rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.explainer__trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--fg);
  text-align: left;
}
.explainer__trigger:hover { background: var(--bg); }
.explainer__icon {
  transition: transform 0.2s;
  font-size: 0.8rem;
  color: var(--fg-muted);
}
.explainer[open] .explainer__icon { transform: rotate(180deg); }
.explainer__body {
  display: none;
  padding: 0 1.5rem 1.5rem;
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.75;
  border-top: 1px solid var(--border);
}
.explainer[open] .explainer__body { display: block; }
.explainer__body h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--fg);
  margin: 1rem 0 0.3rem;
  font-size: 0.88rem;
}
.explainer__body p { margin-bottom: 0.5rem; }
.explainer__body code {
  background: var(--bg-alt);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-family: 'DM Mono', 'Courier New', monospace;
}

.calc-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2rem;
  color: var(--fg-muted);
  font-size: 0.85rem;
  text-decoration: none;
}
.calc-back:hover { color: var(--fg); }

@media (max-width: 760px) {
  .calc-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .result-card__amount { font-size: 1.6rem; }
}
@media (max-width: 480px) {
  .calc-page { padding: 1.25rem 1rem 3rem; }
}
