/* ─── Reset & base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a2030;
  background: #f8f9fb;
  line-height: 1.6;
}
a { color: #1a4f8a; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ─── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
  background: #1a4f8a;
  color: #fff;
  padding: 0 20px;
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.site-logo {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.site-logo span { opacity: .7; font-weight: 400; }
.site-nav { display: flex; gap: 24px; }
.site-nav a {
  color: rgba(255,255,255,.85);
  font-size: .875rem;
  transition: color .15s;
}
.site-nav a:hover { color: #fff; text-decoration: none; }

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1a4f8a 0%, #1565c0 100%);
  color: #fff;
  padding: 48px 20px 52px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 1.05rem;
  opacity: .88;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.5;
}
.hero-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.badge {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: .8rem;
  font-weight: 500;
}

/* ─── Main layout ────────────────────────────────────────────────────────────── */
.main-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}
.sim-layout {
  display: grid;
  gap: 24px;
}
@media (min-width: 1060px) {
  .sim-layout { grid-template-columns: 1fr 268px; }
}

/* ─── Cards ──────────────────────────────────────────────────────────────────── */
.sim-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  padding: 28px;
  margin-bottom: 20px;
}
.sim-card:last-child { margin-bottom: 0; }
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a2030;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 18px;
  background: #1a4f8a;
  border-radius: 2px;
}

/* ─── Form ───────────────────────────────────────────────────────────────────── */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}
.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.input-row input[type="number"] {
  width: 110px;
  padding: 10px 12px;
  border: 1.5px solid #d0d8e4;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #1a4f8a;
  transition: border-color .15s;
  -moz-appearance: textfield;
}
.input-row input[type="number"]:focus { outline: none; border-color: #1a4f8a; }
.input-row input[type="number"]::-webkit-outer-spin-button,
.input-row input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: #d0d8e4;
  border-radius: 4px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a4f8a;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(26,79,138,.3);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a4f8a;
  cursor: pointer;
  border: none;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: #888;
  margin-top: 2px;
}
select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #d0d8e4;
  border-radius: 8px;
  font-size: .9rem;
  background: #fff;
  color: #1a2030;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a4f8a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  transition: border-color .15s;
}
select:focus { outline: none; border-color: #1a4f8a; }
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  padding: 10px 12px;
  border: 1.5px solid #d0d8e4;
  border-radius: 8px;
  transition: border-color .15s, background .15s;
}
.radio-option:has(input:checked) {
  border-color: #1a4f8a;
  background: #f0f4fb;
}
.radio-option input[type="radio"] { margin-top: 2px; accent-color: #1a4f8a; }
.radio-label { font-size: .875rem; color: #444; line-height: 1.4; }
.radio-label strong { color: #1a2030; display: block; }
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .875rem;
  color: #555;
}
.toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #d0d8e4;
  border-radius: 22px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: #1a4f8a; }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ─── Résultats ──────────────────────────────────────────────────────────────── */
.result-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: .95rem;
}
.result-row:last-of-type { border-bottom: none; }
.result-row .label { color: #555; }
.result-row .value { font-weight: 600; color: #1a2030; }
.result-row.deduction .value { color: #c0392b; }
.result-net {
  background: linear-gradient(135deg, #e8f5ee 0%, #d4edda 100%);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}
.result-net-label {
  font-size: .875rem;
  color: #555;
  margin-bottom: 4px;
}
.result-net-amount {
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 800;
  color: #2d9e5f;
  letter-spacing: -0.02em;
  line-height: 1;
}
.result-net-rate {
  font-size: .8rem;
  color: #777;
  margin-top: 6px;
}

/* ─── Alertes TVA ────────────────────────────────────────────────────────────── */
[hidden] { display: none !important; }
.alert {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: .875rem;
  line-height: 1.5;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.alert-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.alert-warn { background: #fff3e0; border: 1px solid #ffb300; color: #7a4f00; }
.alert-danger { background: #fce8e8; border: 1px solid #e53935; color: #7a0000; }

/* ─── CTA Affiliation ────────────────────────────────────────────────────────── */
.cta-bank {
  background: linear-gradient(135deg, #f0f4fb 0%, #e8edf8 100%);
  border: 1px solid #c8d6ec;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.cta-bank-title {
  font-size: .95rem;
  font-weight: 700;
  color: #1a2030;
  margin-bottom: 6px;
}
.cta-bank-sub {
  font-size: .8rem;
  color: #666;
  margin-bottom: 14px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a4f8a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn-primary:hover { background: #1565c0; color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #1a4f8a;
  border: 1.5px solid #1a4f8a;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.btn-secondary:hover { background: #f0f4fb; color: #1a4f8a; text-decoration: none; }
.bank-logos {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.bank-badge {
  background: #fff;
  border: 1px solid #d0d8e4;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .75rem;
  font-weight: 600;
  color: #444;
}

.cta-software {
  padding: 16px 0;
  border-top: 1px solid #f0f2f5;
  margin-top: 4px;
}
.cta-software-title {
  font-size: .8rem;
  color: #888;
  margin-bottom: 10px;
}
.software-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-soft {
  background: #f8f9fb;
  border: 1px solid #d0d8e4;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: .8rem;
  font-weight: 600;
  color: #444;
  text-decoration: none;
  transition: border-color .15s;
}
.btn-soft:hover { border-color: #1a4f8a; color: #1a4f8a; text-decoration: none; }

/* ─── Accordéon SASU ─────────────────────────────────────────────────────────── */
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}
.accordion-header h3 {
  font-size: .95rem;
  font-weight: 700;
  color: #1a2030;
}
.chevron { font-size: .75rem; color: #888; }
.accordion-body { padding-top: 16px; }
.sasu-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.sasu-col {
  background: #f8f9fb;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}
.sasu-col-label { font-size: .75rem; color: #888; margin-bottom: 4px; }
.sasu-col-amount { font-size: 1.2rem; font-weight: 700; color: #1a2030; }
.sasu-col.highlight { background: #e8f5ee; }
.sasu-col.highlight .sasu-col-amount { color: #2d9e5f; }
.sasu-crossover {
  font-size: .8rem;
  color: #666;
  background: #f8f9fb;
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.5;
}

/* ─── Bloc déclaration ───────────────────────────────────────────────────────── */
.declaration-block {
  background: #f8f9fb;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.decl-row {
  display: flex;
  justify-content: space-between;
  font-size: .875rem;
}
.decl-row .decl-label { color: #666; }
.decl-row .decl-value { font-weight: 700; color: #1a2030; }
.decl-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .8rem;
  color: #1a4f8a;
  margin-top: 2px;
}

/* ─── PDF CTA ────────────────────────────────────────────────────────────────── */
.pdf-cta {
  background: linear-gradient(135deg, #1a4f8a 0%, #1565c0 100%);
  color: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
  margin-bottom: 20px;
}
.pdf-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.pdf-cta-title { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.pdf-cta-sub { font-size: .8rem; opacity: .85; margin-bottom: 14px; line-height: 1.5; }
.btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #1a4f8a;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .1s;
}
.btn-pdf:hover { transform: translateY(-1px); text-decoration: none; color: #1a4f8a; }
.pdf-security { font-size: .72rem; opacity: .7; margin-top: 8px; }

/* ─── Sidebar ────────────────────────────────────────────────────────────────── */
.sim-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 1060px) {
  .sim-sidebar {
    position: sticky;
    top: 20px;
    padding-top: 32px;
    align-self: start;
  }
}
.sidebar-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  padding: 20px;
}
.sidebar-card-title {
  font-size: .875rem;
  font-weight: 700;
  color: #1a2030;
  margin-bottom: 12px;
}
.sidebar-links { display: flex; flex-direction: column; gap: 6px; }
.sidebar-link {
  font-size: .8rem;
  color: #1a4f8a;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f2f5;
}
.sidebar-link:last-child { border-bottom: none; }
.sidebar-link::before { content: '→'; font-size: .85rem; }

/* ─── SEO content ────────────────────────────────────────────────────────────── */
.seo-content {
  max-width: 760px;
}
.seo-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a2030;
  margin: 32px 0 12px;
}
.seo-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a2030;
  margin: 20px 0 8px;
}
.seo-content p {
  font-size: .95rem;
  color: #444;
  margin-bottom: 12px;
  line-height: 1.7;
}
.seo-content ul {
  margin: 8px 0 12px 20px;
  color: #444;
  font-size: .95rem;
  line-height: 1.7;
}
.seo-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  margin: 16px 0;
}
.seo-content th {
  background: #1a4f8a;
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}
.seo-content td {
  padding: 9px 14px;
  border-bottom: 1px solid #f0f2f5;
}
.seo-content tr:nth-child(even) td { background: #f8f9fb; }

/* ─── FAQ ────────────────────────────────────────────────────────────────────── */
.faq-section { margin-top: 48px; }
.faq-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.faq-item {
  border: 1px solid #e0e8f0;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  background: #fff;
  transition: background .15s;
}
.faq-question:hover { background: #f8f9fb; }
.faq-icon { font-size: 1.1rem; color: #1a4f8a; font-weight: 400; transition: transform .2s; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding: 0 20px 16px;
  font-size: .9rem;
  color: #555;
  line-height: 1.7;
  background: #fff;
}
.faq-item.open .faq-answer { display: block; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  background: #1a2030;
  color: rgba(255,255,255,.7);
  padding: 32px 20px;
  text-align: center;
  font-size: .8rem;
  margin-top: 64px;
}
.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: #fff; }
.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.footer-disclaimer {
  max-width: 600px;
  margin: 12px auto 0;
  opacity: .6;
  line-height: 1.5;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 36px 16px 40px; }
  .sim-card { padding: 20px 16px; }
  .sasu-compare { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .input-row { flex-direction: column; align-items: flex-start; }
  .input-row input[type="number"] { width: 100%; }
  input[type="range"] { width: 100%; }
}

/* ─── Animations ─────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .result-net-amount {
    transition: color .2s;
  }
}
