/* ── AE vs Salarié comparator styles ────────────────────────────────────────
   Mobile-first. Inherits variables from theme.css.
   ──────────────────────────────────────────────────────────────────────────── */

/* Page shell */
.ae-page {
  min-height: 100vh;
  background: var(--bg, #FDFAF5);
  padding: 0 0 4rem;
}
.ae-page__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.ae-header {
  padding: 2.5rem 0 2rem;
}
.ae-header h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.1;
  color: var(--ink, #1A1612);
  margin: 0 0 0.6rem;
}
.ae-header p {
  font-size: 1rem;
  color: #6B6358;
  margin: 0;
}

/* Layout: sidebar + results */
.ae-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 860px) {
  .ae-layout {
    grid-template-columns: 300px 1fr;
    align-items: start;
  }
}

/* ── Inputs sidebar ── */
.ae-inputs {
  background: #fff;
  border: 1px solid #E8E3DA;
  border-radius: 16px;
  padding: 1.5rem;
}
.ae-inputs__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #B5AEA0;
  margin-bottom: 1.25rem;
}

.form-field {
  margin-bottom: 1.25rem;
}
.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3D3730;
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid #DDD8CF;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #FDFAF5;
  color: #1A1612;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--amber, #F5A623);
}
.input-with-unit {
  position: relative;
}
.input-with-unit input {
  padding-right: 3.5rem;
}
.input-unit {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  color: #9E9890;
  pointer-events: none;
}

/* Toggle group */
.toggle-group {
  display: flex;
  gap: 0.5rem;
}
.toggle-group button {
  flex: 1;
  padding: 0.5rem 0;
  border: 1.5px solid #DDD8CF;
  border-radius: 8px;
  background: #FDFAF5;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6B6358;
  cursor: pointer;
  transition: all 0.15s;
}
.toggle-group button.active {
  background: var(--amber, #F5A623);
  border-color: var(--amber, #F5A623);
  color: #1A1612;
  font-weight: 700;
}
.field-hint {
  font-size: 0.72rem;
  color: #B5AEA0;
  margin: 0.4rem 0 0;
  line-height: 1.4;
}
.source-note {
  font-size: 0.72rem;
  color: #B5AEA0;
  margin-top: 0.5rem;
}

/* ── Results panel ── */
.ae-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Verdict banner */
.verdict-banner {
  background: #1A1612;
  color: #fff;
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.verdict-banner--ae-win { background: #1A4A2E; }
.verdict-banner--sal-win { background: #1A2A4A; }
.verdict-banner--tie { background: #3D3730; }
.verdict-banner__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.verdict-banner__text {
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 500;
}

/* Seuil warning */
.seuil-warning {
  background: #FFF4E0;
  border: 1px solid #F5C842;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #6B4B00;
  line-height: 1.5;
}

/* ── Compare grid ── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) {
  .compare-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Compare card */
.compare-card {
  background: #fff;
  border: 1.5px solid #E8E3DA;
  border-radius: 16px;
  overflow: hidden;
}
.compare-card--ae { border-top: 4px solid #F5A623; }
.compare-card--sal { border-top: 4px solid #3B7CDD; }

.compare-card__header {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid #F0EBE2;
  text-align: center;
}
.compare-card__badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 20px;
  padding: 0.2rem 0.75rem;
  margin-bottom: 0.6rem;
}
.compare-card__badge--ae { background: #FFF0CC; color: #8A5C00; }
.compare-card__badge--sal { background: #EBF2FF; color: #1A4A9A; }

.compare-card__net {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: #1A1612;
  line-height: 1;
}
.compare-card__net-label {
  font-size: 0.78rem;
  color: #9E9890;
  margin-top: 0.2rem;
}

/* Breakdown rows */
.compare-card__body {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #F0EBE2;
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.83rem;
  padding: 0.3rem 0;
  color: #3D3730;
}
.breakdown-row span:last-child { font-weight: 500; }
.breakdown-row--minus span:last-child { color: #C0392B; }
.breakdown-row--subtotal {
  border-top: 1px dashed #E0DBD2;
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  font-weight: 600;
}
.breakdown-row--total {
  border-top: 2px solid #1A1612;
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  font-size: 0.9rem;
}
.breakdown-row--total span:last-child { font-weight: 700; color: #1A1612; }
.breakdown-row--monthly {
  font-size: 0.78rem;
  color: #9E9890;
}
.breakdown-row--employer {
  border-top: 1px dashed #E0DBD2;
  margin-top: 0.25rem;
  padding-top: 0.4rem;
  font-size: 0.78rem;
  color: #9E9890;
}

/* Protection section */
.compare-card__protection {
  padding: 0.85rem 1.25rem;
}
.protection-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #B5AEA0;
  margin-bottom: 0.5rem;
}
.protection-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.8rem;
  color: #3D3730;
  padding: 0.15rem 0;
  line-height: 1.4;
}
.prot-icon {
  flex-shrink: 0;
  font-size: 0.65rem;
  margin-top: 0.2rem;
  width: 1rem;
  text-align: center;
}
.prot-icon--yes  { color: #27AE60; }
.prot-icon--partial { color: #F5A623; }
.prot-icon--no   { color: #C0392B; }

/* IR note */
.ir-note {
  background: #F7F4EF;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  color: #6B6358;
}

/* ── Explainer ── */
.explainer {
  margin-top: 2rem;
  border: 1px solid #E8E3DA;
  border-radius: 12px;
  overflow: hidden;
}
.explainer__trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #fff;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #3D3730;
  cursor: pointer;
  text-align: left;
}
.explainer__icon { font-size: 0.7rem; color: #9E9890; }
.explainer__body {
  display: none;
  padding: 1rem 1.25rem 1.25rem;
  background: #FDFAF5;
  font-size: 0.83rem;
  color: #3D3730;
  line-height: 1.6;
}
.explainer[open] .explainer__body { display: block; }
.explainer__body h4 { font-size: 0.85rem; font-weight: 700; margin: 1rem 0 0.3rem; color: #1A1612; }
.explainer__body h4:first-child { margin-top: 0; }
.explainer__body p { margin: 0 0 0.5rem; }
.explainer__body code { font-family: 'DM Mono', monospace; background: #E8E3DA; border-radius: 4px; padding: 0.1rem 0.35rem; font-size: 0.8rem; }

/* Back link */
.calc-back {
  display: inline-block;
  margin-top: 2rem;
  color: #9E9890;
  text-decoration: none;
  font-size: 0.85rem;
}
.calc-back:hover { color: #3D3730; }

/* Breadcrumb */
.calc-breadcrumb {
  padding: 1.25rem 0 0;
  font-size: 0.78rem;
  color: #B5AEA0;
}
.calc-breadcrumb a { color: #9E9890; text-decoration: none; }
.calc-breadcrumb a:hover { color: #3D3730; }
