.calc-immo {
  --ci-navy: #0F228B;
  --ci-teal: #038189;
  --ci-teal-dark: #0a3d3f;
  --ci-teal-light: #4aabab;
  --ci-track-empty: #D4F3EF;
  --ci-white: #ffffff;
  --ci-bg-page: #ffffff;
  --ci-bg-tabs: #f1f1f1;
  --ci-bg-result: #F4FAFA;
  --ci-bg-input: #ffffff;
  --ci-border: #d4d8dc;
  --ci-border-light: #e2e6ea;
  --ci-text: #282828;
  --ci-text-secondary: #707070;
  --ci-text-muted: #717981;
  --ci-red: #da2d10;
  --ci-red-hover: #cc0026;
  --ci-link: #006d6f;
  --ci-font: "ManropeVariable",Arial,Helvetica,sans-serif;
  --ci-radius: 8px;
  --ci-radius-pill: 100px;

  font-family: var(--ci-font);
  color: var(--ci-text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.calc-immo *,
.calc-immo *::before,
.calc-immo *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========================================
   SCREEN / LAYOUT
   ======================================== */
.calc-immo .screen {
  padding: 28px 0px 12px;
  margin: 0 auto;
}

.calc-immo .hidden {
  display: none !important;
}

.calc-immo .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.calc-immo .calc-layout {
  display: flex;
  flex-direction: column;
}

/* ========================================
   TITRE PAGE
   ======================================== */
.calc-immo .page-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--ci-navy);
  line-height: 1.2;
  margin-bottom: 48px;
  letter-spacing: -0.3px;
}

/* ========================================
   ONGLETS
   ======================================== */
.calc-immo .tabs {
  display: flex;
  background: var(--ci-bg-tabs);
  border-radius: var(--ci-radius-pill);
  padding: 3px;
  margin-bottom: 32px;
  position: relative;
}

.calc-immo .tabs::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: var(--ci-white);
  border-radius: var(--ci-radius-pill);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.calc-immo .tabs.tab-right::after {
  transform: translateX(100%);
}

.calc-immo .tab {
  flex: 1;
  padding: 9px 0;
  border: none;
  border-radius: var(--ci-radius-pill);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--ci-text-secondary);
  cursor: pointer;
  transition: color 0.3s ease, font-weight 0.3s ease;
  font-family: inherit;
  position: relative;
  z-index: 1;
}

.calc-immo .tab.active {
  color: var(--ci-text);
  font-weight: 600;
}

/* ========================================
   TAB CONTENT
   ======================================== */
.calc-immo .tab-content {
  display: none;
}

.calc-immo .tab-content.active {
  display: block;
}

/* ========================================
   FLOATING LABEL FIELDS
   ======================================== */
.calc-immo #contact-intro {margin:24px 0;}
.calc-immo .float-field {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius);
  height: 54px;
  background: var(--ci-bg-input);
  transition: border-color 0.2s;
}

.calc-immo .float-field:focus-within {
  border-color: var(--ci-text);
  border-width: 2px;
}

.calc-immo .float-field.has-error {
  border-color: var(--ci-red);
}

.calc-immo .float-field.has-error label,
.calc-immo .float-field.has-error:focus-within label {
  color: var(--ci-red);
}

.calc-immo .float-field .form__error {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ci-red);
  line-height: 1.4;
}

.calc-immo .float-field .form__error b {
  font-weight: 600;
}

.calc-immo .mandatory {
  color: var(--ci-red);
  margin-left: 2px;
}

.calc-immo .contact-form .float-field {
  margin-bottom: 8px;
}

.calc-immo .float-field input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
    font-weight: 600;
    color: var(--ci-text);
  font-family: inherit;
  background: transparent;
  padding: 20px 14px 6px;
  min-width: 0;
  height: 56px;
}

.calc-immo .float-field label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--ci-text);
  pointer-events: none;
  transition: all 0.2s ease;
  transform-origin: left center;
}

.calc-immo .float-field:focus-within label,
.calc-immo .float-field.has-value label {
  top: 5px;
  transform: translateY(0);
  font-size: 11px;
  color: var(--ci-text-muted);
}

.calc-immo .field-unit {
  font-size: 13px;
  color: var(--ci-text-muted);
  padding-right: 14px;
  white-space: nowrap;
  flex-shrink: 0;
  border-left: 1px solid var(--ci-border-light);
  padding-left: 12px;
  height: 60%;
  display: flex;
  align-items: center;
}

/* ========================================
   SLIDERS
   ======================================== */
.calc-immo .slider-block {
  padding-top: 32px;
}

.calc-immo .slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.calc-immo .slider-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--ci-text);
}

.calc-immo .slider-value-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--ci-border);
  border-radius: var(--ci-radius);
  padding: 7px 12px;
  background: var(--ci-white);
  min-width: 100px;
  justify-content: center;
  height: 56px;
}

.calc-immo .slider-value-box:focus-within {
    border-color: var(--ci-teal);;
}

.calc-immo .slider-value-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: var(--ci-navy);
  text-align: right;
  width: 40px;
  font-family: inherit;
  padding: 0;
}

.calc-immo .slider-value-unit {
  font-size: 14px;
  font-weight: 400 !important;
  color: var(--ci-text-secondary) !important;
  padding-top: 4px;
}

.calc-immo .slider-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.calc-immo .slider-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--ci-border);
  background: var(--ci-white);
  color: var(--ci-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
  padding: 0;
}

.calc-immo .slider-btn:hover {
  background: var(--ci-bg-tabs);
  border-color: #bcc1c7;
}

.calc-immo .slider-btn:active {
  transform: scale(0.94);
}

.calc-immo .slider-track-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
}

.calc-immo input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, var(--ci-teal-dark) 0%, var(--ci-teal) 50%, var(--ci-track-empty) 50%);
}

.calc-immo input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ci-white);
  border: 3px solid var(--ci-teal);
  box-shadow: 0 1px 6px #40FFD2;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.calc-immo input[type="range"]::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ci-white);
  border: 3px solid var(--ci-teal);
  box-shadow: 0 1px 6px #40FFD2;
  cursor: pointer;
}

.calc-immo input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 3px;
  background: var(--ci-track-empty);
  border: none;
}

.calc-immo input[type="range"]::-moz-range-progress {
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--ci-teal-dark), var(--ci-teal));
}

.calc-immo .slider-bounds {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  padding: 0 2px;
}

.calc-immo .slider-bounds span {
  font-size: 14px;
  color: var(--ci-text-muted);
}

.calc-immo .reset-taux {
  display: block;
  margin: 6px auto 0;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--ci-text-muted);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  position: relative;
}

.calc-immo .reset-taux::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--ci-text-muted);
  opacity: 0.5;
}

.calc-immo .reset-taux:hover {
  color: var(--ci-text-secondary);
}

/* ========================================
   TOGGLE VOIR PLUS/MOINS (mobile only)
   ======================================== */
.calc-immo .btn-toggle-details {
  display: none;
}

.calc-immo .result-sticky-header {
  display: contents;
}

/* ========================================
   BLOC RÉSULTAT
   ======================================== */
.calc-immo .result-block {
  background: var(--ci-bg-result);
  border-radius: 10px;
  padding: 32px 18px 20px;
  margin-top: 48px;
  text-align: center;
}

.calc-immo .result-hero {
  margin-bottom: 32px;
}

.calc-immo .result-label {
  font-size: 20px;
  font-weight: 500;
  color: var(--ci-text);
  margin-bottom: 12px;
}

.calc-immo .result-label sup {
  font-size: 9px;
  vertical-align: super;
}

.calc-immo .result-amount {
  font-size: 26px;
  font-weight: 800;
  color: var(--ci-navy);
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.calc-immo .result-details {
  text-align: left;
  margin-bottom: 32px;
}

.calc-immo .result-details dl {
  display: flex;
  flex-direction: column;
}

.calc-immo .detail-row {
  display: flex;
  align-items: baseline;
  padding: 5px 0;
  gap: 4px;
  flex-wrap: nowrap;
}

.calc-immo .detail-row dt {
  font-size: 14px;
  font-weight: 500;
  color: var(--ci-text);
  white-space: nowrap;
  flex-shrink: 0;
  order: 0;
}

.calc-immo .detail-row dt sup {
  font-size: 8px;
}

.calc-immo .detail-row::after {
  content: '';
  flex: 1;
  border-bottom: 1px dotted var(--ci-border);
  margin: 0 4px;
  min-width: 10px;
  position: relative;
  top: 0px;
  order: 1;
}

.calc-immo .detail-row dd {
  font-size: 14px;
  font-weight: 400;
  color: var(--ci-text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  order: 2;
}

.calc-immo .usure-warning {
  font-size: 12px;
  font-weight: 600;
  color: var(--ci-red);
  margin: -2px 0 6px;
}

.calc-immo .cta-intro {
  font-size: 14px;
  color: var(--ci-text);
  text-align: center;
  margin-bottom: 0;
}

.calc-immo .btn-rappel {
  display: block;
  width: 100%;
  padding: 14px 0;
  background: var(--ci-teal);
  color: var(--ci-white);
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-align: center;
}

.calc-immo .btn-rappel:hover {
  background: var(--ci-teal-dark);
}

.calc-immo .btn-rappel:active {
  transform: scale(0.97);
}

/* ========================================
   MOBILE : Sticky bottom + toggle
   ======================================== */
@media (max-width: 767px) {
  .calc-immo .calc-results {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .calc-immo.calc-in-view .calc-results {
    transform: translateY(0);
  }

  .calc-immo .result-block {
    margin-top: 0;
    border-radius: 16px 16px 0 0;
    padding: 16px 18px 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  }

  .calc-immo .result-sticky-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .calc-immo .result-hero-wrap {
    flex: 1;
    min-width: 0;
  }

  .calc-immo .result-hero {
    margin-bottom: 0;
    text-align: left;
  }

  .calc-immo .result-label {
    font-size: 14px;
    margin-bottom: 2px;
  }

  .calc-immo .result-amount {
    font-size: 22px;
    margin-bottom: 16px;
  }

  .calc-immo .btn-toggle-details {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--ci-border);
    border-radius: var(--ci-radius-pill);
    background: var(--ci-white);
    font-size: 12px;
    font-weight: 500;
    color: var(--ci-text);
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
  }

  .calc-immo .btn-toggle-details:hover {
    background: var(--ci-bg-tabs);
  }

  .calc-immo .toggle-chevron {
    transition: transform 0.25s ease;
  }

  .calc-immo .result-block.is-expanded .toggle-chevron {
    transform: rotate(180deg);
  }

  .calc-immo .result-details {
    display: none;
    margin-bottom: 12px;
  }

  .calc-immo .result-block.is-expanded .result-details {
    display: block;
  }

  .calc-immo .calc-inputs {
    padding-bottom: 36px;
  }
}

/* ========================================
   MENTIONS LÉGALES
   ======================================== */
.calc-immo .legal-notes {
  margin-top: 20px;
}

.calc-immo .legal-notes p {
  font-size: 10px;
  color: var(--ci-text-muted);
  line-height: 1.5;
  margin-bottom: 6px;
}

.calc-immo .legal-notes sup {
  font-size: 7px;
  margin-right: 1px;
}

/* ========================================
   OVERLAY
   ======================================== */
.calc-immo .overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
}

.calc-immo .overlay.is-open {
  pointer-events: auto;
  visibility: visible;
}

.calc-immo .overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}

.calc-immo .overlay.is-open .overlay-backdrop {
  background: rgba(0, 0, 0, 0.45);
}

/* ========================================
   MOBILE : Bottom Sheet
   ======================================== */
.calc-immo .modal-sheet {
  position: relative;
  width: 100%;
  max-height: 92vh;
  background: var(--ci-white);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.calc-immo .overlay.is-open .modal-sheet {
  transform: translateY(0);
}

.calc-immo .modal-sheet-handle {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
}

.calc-immo .modal-sheet-handle span {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--ci-border);
}

.calc-immo .modal-sheet-content {
  padding: 8px 24px 48px;
}

/* ========================================
   CONTACT FORM
   ======================================== */
.calc-immo .contact-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.calc-immo .contact-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--ci-navy);
  line-height: 1.25;
  flex: 1;
  padding-top:8px;
}

.calc-immo .btn-close {
  width: 44px;
  height: 44px;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  color: var(--ci-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 12px;
  border-radius: 50%;
  transition: background 0.15s;
}

.calc-immo .btn-close:hover {
  background: var(--ci-bg-tabs);
}

.calc-immo .contact-desc {
  font-size: 16px;
  color: var(--ci-text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
  text-align:center;
}

.calc-immo .contact-privacy {
  font-size: 13px;
  color: var(--ci-text-muted);
  text-align:center;
}

.calc-immo .contact-privacy a {
  color: var(--ci-link);
  text-decoration: none;
  font-weight: 600;
}

.calc-immo .contact-privacy a:hover {
  text-decoration: underline;
}

.calc-immo .contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ========================================
   CONFIRMATION
   ======================================== */
.calc-immo .contact-confirm {
  text-align: center;
  padding: 24px 0 8px;
}

.calc-immo .confirm-icon {
  margin-bottom: 20px;
}

.calc-immo .confirm-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ci-navy);
  margin-bottom: 10px;
}

.calc-immo .confirm-text {
  font-size: 14px;
  color: var(--ci-text-secondary);
  line-height: 1.55;
  margin-bottom: 28px;
}

/* ========================================
   DESKTOP : Popin centrée
   ======================================== */
@media (min-width: 768px) {
  .calc-immo .overlay {
    align-items: center;
  }

  .calc-immo .modal-sheet {
    width: 460px;
    max-height: 85vh;
    border-radius: 16px;
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
  }

  .calc-immo .overlay.is-open .modal-sheet {
    transform: translateY(0);
    opacity: 1;
  }

  .calc-immo .modal-sheet-handle {
    display: none;
  }

  .calc-immo .modal-sheet-content {
    padding: 28px 32px 36px;
  }
}

/* ========================================
   DESKTOP : 2 colonnes + card
   ======================================== */
@media (min-width: 768px) {
  .calc-immo .screen {
    padding: 12px 24px 12px;
    margin: 32px auto;
    background: var(--ci-white);
    border-radius: 14px;
    /*box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);*/
  }

  .calc-immo .page-title {
    font-size: 28px;
    margin-bottom: 24px;
  }

  .calc-immo .calc-layout {
    flex-direction: row;
    gap: 80px;
    align-items: flex-start;
  }

  .calc-immo .calc-inputs {
    flex: 1;
    min-width: 0;
  }

  .calc-immo .calc-results {
    width: 340px;
    flex-shrink: 0;
    position: sticky;
    top: 32px;
  }

  .calc-immo .result-block {
    margin-top: 0;
    padding: 28px 24px 24px;
  }

  .calc-immo .result-amount {
    font-size: 30px;
  }

  .calc-immo .legal-notes {
    margin-top: 28px;
  }
}

@media (min-width: 1024px) {
  .calc-immo .screen {
    padding: 12px 24px 12px;
  }

  .calc-immo .calc-results {
    width: 380px;
  }
}
