/* =========================================================
   CALCULATEUR REVENUS LOCATIFS — CSS DÉDIÉ
   ========================================================= */

.loyer-hero {
  background: linear-gradient(135deg, #0e2441 0%, #193a65 55%, #1d4070 100%);
  padding: 88px 0 108px;
  position: relative;
  overflow: hidden;
}

.loyer-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 25%, rgba(201, 154, 85, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(7, 18, 30, 0.08) 0%, rgba(7, 18, 30, 0.26) 100%);
  pointer-events: none;
}

.loyer-hero > .container { position: relative; z-index: 1; }

.loyer-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;
}

.loyer-hero h1 {
  color: #ffffff;
  max-width: 840px;
  margin: 0 0 22px;
  font-size: clamp(2.8rem, 4.6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.loyer-hero .hero-text {
  color: rgba(255, 255, 255, 0.84);
  max-width: 740px;
  font-size: 1.08rem;
  line-height: 1.72;
  margin: 0;
}

.loyer-tool-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.section-loyer-tool-page {
  background: linear-gradient(180deg, #f9f5ee 0%, #f3ead9 100%);
}

.loyer-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);
}

.loyer-topbar {
  margin-bottom: 32px;
  display: flex;
  justify-content: center;
}

.loyer-tabs {
  display: inline-flex;
  background: rgba(201, 154, 85, 0.14);
  border-radius: 999px;
  padding: 6px;
  gap: 6px;
  margin: 0 auto;
}

.loyer-tab {
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 700;
  color: #8f5b18;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  font-family: inherit;
}

.loyer-tab.is-active {
  background: #c99a55;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(201, 154, 85, 0.28);
}

.loyer-tab:hover {
  transform: translateY(-1px);
}

.loyer-tool-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.loyer-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.loyer-tool-form .form-field label {
  font-weight: 700;
  color: #0f2743;
  font-size: 0.97rem;
}

.loyer-tool-form .form-field small {
  color: #6b7480;
  font-size: 0.83rem;
  line-height: 1.45;
}

.loyer-tool-form select,
.loyer-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;
}

.loyer-tool-form select:focus,
.loyer-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);
}

.loyer-tool-reading {
  margin-top: 38px;
  padding-top: 36px;
  border-top: 1px solid rgba(23, 40, 58, 0.08);
}

.loyer-reading-intro {
  margin-bottom: 28px;
}

.loyer-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;
}

.loyer-reading-intro p {
  margin: 0;
  color: #425263;
  font-size: 1rem;
}

.loyer-targets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}

.loyer-target-card {
  border-radius: 24px;
  padding: 30px;
  border: 1px solid rgba(23, 40, 58, 0.08);
  box-shadow: 0 12px 30px rgba(9, 27, 49, 0.05);
}

.loyer-target-correct {
  background: linear-gradient(180deg, #fffdf7 0%, #fef8e8 100%);
  border-color: rgba(211, 162, 77, 0.28);
}

.loyer-target-good {
  background: linear-gradient(180deg, #f3fbf5 0%, #e7f5ea 100%);
  border-color: rgba(54, 115, 78, 0.22);
}

.loyer-target-strong {
  background: linear-gradient(180deg, #f3f7ff 0%, #e7eefc 100%);
  border-color: rgba(46, 92, 164, 0.24);
}

.loyer-target-badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.loyer-badge-correct { background: rgba(211, 162, 77, 0.18); color: #8a6220; }
.loyer-badge-good    { background: rgba(54, 115, 78, 0.14); color: #2d6b3e; }
.loyer-badge-strong  { background: rgba(46, 92, 164, 0.14); color: #234f96; }

.loyer-target-range {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 18px;
  color: #091b31;
}

.loyer-target-income {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.loyer-income-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.loyer-income-line span {
  font-size: 0.88rem;
  color: #5f6e7c;
}

.loyer-income-line strong {
  font-size: 1.12rem;
  font-weight: 700;
  color: #0f2743;
  text-align: right;
}

.loyer-income-annual {
  padding-top: 8px;
  border-top: 1px solid rgba(23, 40, 58, 0.07);
}

.loyer-income-annual strong {
  font-size: 0.95rem;
  color: #425263;
}

.loyer-target-note {
  margin: 0;
  font-size: 0.84rem;
  color: #6b7480;
  line-height: 1.55;
  padding-top: 14px;
  border-top: 1px solid rgba(23, 40, 58, 0.07);
}

.loyer-context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}

.loyer-pdf-box {
  margin-top: 24px;
}

.loyer-pdf-box.is-hidden {
  display: none;
}

.loyer-pdf-box__inner {
  background: linear-gradient(180deg, #fffdfa 0%, #f7f1e6 100%);
  border: 1px solid rgba(201, 154, 85, 0.22);
  border-radius: 24px;
  padding: 26px;
}

.loyer-pdf-actions {
  margin-top: 18px;
}

.loyer-pdf-feedback {
  margin-top: 14px;
  font-size: 0.95rem;
  color: #425263;
  min-height: 24px;
}

.loyer-pdf-feedback.is-success {
  color: #25613c;
}

.loyer-pdf-feedback.is-error {
  color: #9a2b2b;
}

.tool-reset-footer {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 1024px) {
  .loyer-targets-grid,
  .loyer-context-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .loyer-tool-box {
    padding: 26px;
    border-radius: 22px;
  }

  .loyer-tool-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .loyer-target-range {
    font-size: 1.8rem;
  }
}

/* ==============================
   BLOC PDF EMAIL
   ============================== */

.loyer-pdf-box {
  margin-top: 28px;
}

.loyer-pdf-box.is-hidden {
  display: none;
}

.loyer-pdf-box__inner {
  background: linear-gradient(180deg, #fffdfa 0%, #f8f2e8 100%);
  border: 1px solid rgba(201, 154, 85, 0.22);
  border-radius: 28px;
  padding: 34px;
  box-shadow: 0 18px 40px rgba(9, 27, 49, 0.06);
}

.loyer-pdf-box .section-kicker {
  display: block;
  margin-bottom: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3f4e62;
}

.loyer-pdf-box h3 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 2.2vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #0f2743;
}

.loyer-pdf-box p {
  margin: 0 0 22px;
  color: #425263;
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 980px;
}

.loyer-pdf-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.loyer-pdf-form .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.loyer-pdf-form input[type="text"],
.loyer-pdf-form input[type="email"] {
  width: 100%;
  min-height: 64px;
  padding: 0 20px;
  border-radius: 18px;
  border: 1px solid rgba(23, 40, 58, 0.12);
  background: #ffffff;
  font-size: 15px;
  color: #17283a;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.loyer-pdf-form input[type="text"]:focus,
.loyer-pdf-form input[type="email"]:focus {
  outline: none;
  border-color: rgba(201, 154, 85, 0.75);
  box-shadow: 0 0 0 4px rgba(201, 154, 85, 0.12);
  transform: translateY(-1px);
}

.loyer-pdf-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
}

.loyer-pdf-actions .btn {
  min-height: 58px;
  padding: 0 30px;
  border-radius: 999px;
  font-weight: 700;
}

.loyer-pdf-feedback {
  min-height: 26px;
  margin: 2px 0 0;
  font-size: 0.96rem;
  line-height: 1.5;
  color: #425263;
}

.loyer-pdf-feedback.is-success {
  color: #25613c;
  font-weight: 600;
}

.loyer-pdf-feedback.is-error {
  color: #a22d2d;
  font-weight: 600;
}

@media (max-width: 860px) {
  .loyer-pdf-box__inner {
    padding: 24px;
    border-radius: 22px;
  }

  .loyer-pdf-form .grid-2 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .loyer-pdf-box h3 {
    font-size: 1.6rem;
  }
}
