/* === Desktop responsive fix (keeps mobile intact) === */
@media (min-width: 1024px) {
  /* Constrain main wrappers to 920px and center */
  .wrap,
  .container,
  .lead-wrap,
  .hiw-wrap,
  .benefits-wrap,
  .mf-top.container,
  .mf-bottom.container {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Headline should use the whole available width */
  .lead-title,
  .hero-title {
    max-width: none;
  }

  /* Make bullet points display in 2 columns on desktop */
  .lead-points {
    display: grid;
    grid-template-columns: 1fr 0fr;
    gap: 10px 24px;
    list-style: disc inside;
    padding: 0;
    margin: 0;
  }
  .lead-points li {
    break-inside: avoid;
  }

  /* Unified card grid: two columns when space allows */
  .card-unified .uni-grid {
    display: grid;
    grid-template-columns: 1fr 0fr;
    gap: 24px;
  }

  /* Form cells nicer widths */
  .form-2col {
    display: grid;
    grid-template-columns: 1fr 0fr;
    gap: 16px 20px;
  }
  .form-2col .span2 {
    grid-column: 1 / -1;
  }

  /* Center key KPI block */
  .center-stat { text-align: center; }
  .center-actions { display:flex; justify-content:center; margin-top:8px; }

  /* Footer max-width already handled via .container */
}
/* === End desktop fix === */


/* === Full-width hero title on desktop === */
@media (min-width: 1024px) {
  /* Break the hero section out of the centered wrapper to span full viewport width */
  .lead-hero {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: min(5vw, 40px);
    padding-right: min(5vw, 40px);
  }
  .lead-hero .lead-wrap {
    max-width: none;
    width: 100%;
  }
  .lead-hero .lead-title {
    max-width: none;
  }
  /* Keep bullet list contained under the full-bleed title */
  .lead-hero .lead-points {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
  }
}
/* === End full-width hero === */


/* === Full-width hero: single block, no banding === */
@media (min-width: 1024px) {
  /* Remove parent background to avoid "3 bandes" visuelles */
  .lead-hero { background: transparent !important; }

  /* Make the inner .lead-wrap the full-bleed block */
  .lead-hero .lead-wrap {
    max-width: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: min(5vw, 40px);
    padding-right: min(5vw, 40px);
  }

  /* Title spans entire block */
  .lead-hero .lead-title {
    max-width: none;
    width: 100%;
  }

  /* Keep the bullet list contained under the full-bleed title */
  .lead-hero .lead-points {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
  }
}
/* === End patch === */


/* === Remove empty right column on desktop === */
@media (min-width: 1024px) {
  /* Default to single column */
  .card-unified .uni-grid {
    grid-template-columns: 1fr;
  }
  /* If there is actual content on the right, switch to 2 columns */
  .card-unified .uni-grid:has(.uni-right:not(:empty)) {
    grid-template-columns: 1fr 0fr;
  }
  /* Hide a truly empty right pane (no text/nodes) */
  .card-unified .uni-right:empty {
    display: none;
  }
}
/* === End: remove empty right column === */


/* === Force layout: 1fr 0fr on desktop as requested === */
@media (min-width: 1024px) {
  .card-unified .uni-grid {
    grid-template-columns: 1fr 0fr !important;
  }
}

/* Remove default list numbers for hiw steps */
.hiw-steps { list-style: none; padding-left: 0; margin: 0; }

/* === How-it-works: 3 columns on desktop === */
@media (min-width: 1024px) {
  .hiw-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 24px;
    align-items: stretch;
  }
  .hiw-step { display: flex; flex-direction: column; gap: 12px; }
  .hiw-step .card { height: 100%; }
}
/* === End HIW desktop grid === */


/* === FASTLEASING: center hero title + fix field widths (desktop only) === */
@media (min-width: 1024px){
  /* Center the main heading above the blocks */
  .lead-wrap > h1{
    text-align: center !important;
    max-width: 1100px;
    margin: 0 auto 14px;
    line-height: 1.1;
  }

  /* Make right-hand short fields visible (e.g., Apport, Durée) */
  .form-2col{
    grid-template-columns: minmax(520px, 1fr) 260px !important;
    align-items: end;
  }
  .form-2col > .cell:last-child{
    min-width: 260px !important;
    max-width: 340px;
  }
  .form-2col > .cell input,
  .form-2col > .cell select{
    width: 100% !important;
    min-width: 0;
  }
  /* keep room for suffix CHF / mois if present */
  .form-2col .input-wrap{ position: relative; }
  .form-2col .input-wrap input{ padding-right: 48px !important; }
  .form-2col .input-wrap .suffix{
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    pointer-events: none; opacity: .85;
  }
}
