/* =========================================================
   CALCULATEUR FRAIS D'ACQUISITION — CSS DÉDIÉ
   ========================================================= */

.frais-hero {
  background: linear-gradient(135deg, #0d2240 0%, #17355e 60%, #1e3e6b 100%);
  padding: 88px 0 108px;
  position: relative;
  overflow: hidden;
}

.frais-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(201, 154, 85, 0.13), transparent 28%),
    linear-gradient(180deg, rgba(7, 18, 30, 0.1) 0%, rgba(7, 18, 30, 0.28) 100%);
  pointer-events: none;
}

.frais-hero > .container { position: relative; z-index: 1; }

.frais-hero .hero-kicker {
  display: block;
  color: rgba(201, 154, 85, 0.9);
  opacity: 1;
  margin-bottom: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.78rem;
}

.frais-hero h1 {
  color: #ffffff;
  max-width: 820px;
  margin: 0 0 22px;
  font-size: clamp(2.8rem, 4.8vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.frais-hero .hero-text {
  color: rgba(255, 255, 255, 0.84);
  max-width: 700px;
  font-size: 1.08rem;
  line-height: 1.72;
  margin: 0;
}

/* ── Shell & Box ── */
.frais-tool-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.frais-tool-box {
  background: linear-gradient(180deg, #ffffff 0%, #fbf8f3 100%);
  border: 1px solid rgba(23, 40, 58, 0.08);
  border-radius: 32px;
  padding: 44px;
  box-shadow: 0 24px 52px rgba(9, 27, 49, 0.08);
}

/* ── Formulaire ── */
.frais-tool-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.frais-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.frais-tool-form .form-field label {
  font-weight: 700;
  color: #0f2743;
  font-size: 0.97rem;
}

.frais-tool-form .form-field small {
  color: #6b7480;
  font-size: 0.83rem;
  line-height: 1.45;
}

.frais-tool-form select,
.frais-tool-form input {
  width: 100%;
  min-height: 68px;
  padding: 0 20px;
  border-radius: 18px;
  border: 1px solid rgba(23, 40, 58, 0.12);
  background: #fff;
  font-size: 15px;
  color: #17283a;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.frais-tool-form select:focus,
.frais-tool-form input:focus {
  outline: none;
  border-color: rgba(201, 154, 85, 0.7);
  box-shadow: 0 0 0 4px rgba(201, 154, 85, 0.12);
}

.frais-tool-actions {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

/* ── Lecture résultats ── */
.frais-tool-reading {
  margin-top: 38px;
  padding-top: 36px;
  border-top: 1px solid rgba(23, 40, 58, 0.08);
}

.frais-reading-intro {
  margin-bottom: 28px;
}

.frais-reading-intro h3 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 2.2vw, 2.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #091b31;
}

.frais-reading-intro p {
  margin: 0;
  color: #425263;
  font-size: 1rem;
}

/* ── Summary cards ── */
.frais-summary-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.frais-summary-grid .result-card {
  background: linear-gradient(180deg, #fff 0%, #faf6ef 100%);
  border: 1px solid rgba(23, 40, 58, 0.08);
  border-radius: 22px;
  padding: 26px 28px;
  box-shadow: 0 12px 30px rgba(9, 27, 49, 0.05);
}

.frais-card-total {
  border-color: rgba(201, 154, 85, 0.3) !important;
  background: linear-gradient(180deg, #fffdf8 0%, #f9f1e4 100%) !important;
}

/* ── Détail grid ── */
.frais-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.frais-detail-card {
  background: #ffffff;
  border: 1px solid rgba(23, 40, 58, 0.08);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 8px 24px rgba(9, 27, 49, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.frais-detail-card:hover {
  border-color: rgba(201, 154, 85, 0.22);
  box-shadow: 0 14px 32px rgba(9, 27, 49, 0.07);
}

.frais-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.frais-detail-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.frais-detail-head h4 {
  margin: 0 0 5px;
  font-size: 1rem;
  font-weight: 700;
  color: #091b31;
  line-height: 1.2;
}

.frais-detail-basis {
  font-size: 0.82rem;
  color: #a77b3d;
  font-weight: 600;
}

.frais-detail-amounts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.frais-amount-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.frais-amount-line span {
  font-size: 0.84rem;
  color: #6b7480;
}

.frais-amount-line strong {
  font-size: 1.08rem;
  color: #0f2743;
  font-weight: 700;
}

.frais-amount-ttc strong {
  color: #0f2743;
}

.frais-detail-note {
  display: block;
  font-size: 0.8rem;
  color: #8a97a4;
  line-height: 1.5;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(23, 40, 58, 0.06);
}

/* Spécial : carte agence en léger doré */
.frais-detail-card--agence {
  background: linear-gradient(180deg, #fffdf8 0%, #faf4e9 100%);
  border-color: rgba(201, 154, 85, 0.18);
}

/* Spécial : carte hypothèque en bleu doux */
.frais-detail-card--hypotheque {
  background: linear-gradient(180deg, #f5f8fd 0%, #edf1f9 100%);
  border-color: rgba(20, 60, 120, 0.1);
}

/* Spécial : divers en gris neutre */
.frais-detail-card--divers {
  background: linear-gradient(180deg, #f9f9f9 0%, #f2f2f2 100%);
  border-color: rgba(23, 40, 58, 0.06);
}

/* ── Note légale ── */
.frais-legal-note {
  margin-top: 24px;
  background: linear-gradient(180deg, #f0f4fa 0%, #e8eef8 100%);
  border: 1px solid rgba(20, 60, 120, 0.1);
  border-radius: 18px;
  padding: 20px 24px;
}

.frais-legal-note p {
  margin: 0;
  font-size: 0.88rem;
  color: #3a5070;
  line-height: 1.65;
}

/* ── Section page ── */
.section-frais-tool-page {
  background: linear-gradient(180deg, #f9f5ee 0%, #f3ead9 100%);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .frais-detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .frais-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .frais-tool-box {
    padding: 26px;
    border-radius: 22px;
  }

  .frais-tool-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .frais-detail-grid {
    grid-template-columns: 1fr;
  }
}
