/* Comparateur tarifs — CSS dédié (ne pas merger dans style.css) */

/* Desktop : form + SEO + FAQ = largeur du .container (alignés sur le H2) */
.form-page:has(#cmp-root) > .container > .form-seo,
.form-page:has(#cmp-root) > .container > .module-form,
.form-page:has(#cmp-root) > .container > .faq-block,
.form-page:has(#cmp-root) > .container > .form-message,
.form-page:has(#cmp-root) > .container > .form-related,
.form-page:has(#cmp-root) > .container > .cmp-examples,
.form-page:has(#cmp-root) > .container > .cmp-guides {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.module-form.cmp-wide,
.module-form:has(#cmp-root) {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* Bandeau devis : texte aligné sur la colonne container */
body:has(#cmp-root) .form-banner h1,
body:has(#cmp-root) .form-banner p {
  max-width: none;
}

.cmp {
  margin: 0;
  padding: 1rem 0 0;
  border-top: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
}
.cmp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin: 0 0 .75rem;
}
.cmp-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--primary);
}
.cmp-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin: 0 0 1rem;
}
.cmp-mode {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, #ccc);
  background: #fff;
  color: var(--primary);
  border-radius: .5rem;
  padding: .7rem .85rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.cmp-mode.is-active {
  background: color-mix(in srgb, var(--secondary) 14%, #fff);
  border-color: var(--secondary);
  color: var(--primary);
}

.cmp-recalc {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--primary) 25%, #ccc);
  background: #fff;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  font-size: .88rem;
  border-radius: .45rem;
  padding: .45rem .75rem;
  cursor: pointer;
  margin: 0 0 .75rem;
}
.cmp-recalc:hover {
  border-color: var(--secondary);
  background: color-mix(in srgb, var(--secondary) 8%, #fff);
}

.cmp-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem .75rem;
  margin-bottom: .75rem;
}
.cmp-filters label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary);
}
.cmp-filters select {
  font: inherit;
  font-weight: 400;
  padding: .45rem .5rem;
  border-radius: .4rem;
  border: 1px solid #cfd8d8;
  background: #fff;
  width: 100%;
}
.cmp-guar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .85rem;
  margin: 0 0 .85rem;
  padding: .65rem .75rem;
  border-radius: .5rem;
  background: color-mix(in srgb, var(--secondary) 8%, #fff);
}
.cmp-guar-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  margin-right: .25rem;
}
.cmp-check {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  margin: 0;
}
.cmp-check input {
  width: auto;
  margin: 0;
  accent-color: var(--secondary);
}
.cmp-hint,
.cmp-status {
  margin: 0 0 .75rem;
  font-size: .85rem;
  color: #456;
  line-height: 1.4;
}
.cmp-results {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.cmp-tile {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) minmax(11.5rem, 13rem);
  gap: .85rem 1rem;
  align-items: center;
  background: #fff;
  border: 1px solid #dbe3e3;
  border-radius: .75rem;
  padding: .85rem 1rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
  overflow: hidden;
}
.cmp-tile.is-selected {
  border-color: var(--secondary);
  box-shadow: 0 0 0 1px var(--secondary);
}
.cmp-tile-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  min-width: 0;
}
.cmp-tile-brand img {
  width: 4.25rem;
  height: auto;
  object-fit: contain;
}
.cmp-provider {
  font-size: .95rem;
  color: #234;
}
.cmp-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--primary);
  background: color-mix(in srgb, var(--secondary) 16%, #fff);
  border-radius: .3rem;
  padding: .15rem .4rem;
  line-height: 1.25;
}
.cmp-product {
  font-size: .7rem;
  color: #567;
  line-height: 1.25;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.cmp-guarantees {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .84rem;
  line-height: 1.45;
  min-width: 0;
}
.cmp-guarantees li {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.cmp-guarantees .ok { color: #1b6b4a; }
.cmp-guarantees .no { color: #9aa; }
.cmp-guarantees i { width: .9rem; text-align: center; flex-shrink: 0; }
.cmp-tile-end {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .55rem;
  min-width: 0;
}
.cmp-price { text-align: left; }
.cmp-price-label {
  display: block;
  font-size: .75rem;
  color: #678;
  margin-bottom: .15rem;
}
.cmp-price strong {
  display: block;
  font-size: 1.3rem;
  color: var(--secondary);
  line-height: 1.15;
  word-break: break-word;
}
.cmp-price-year {
  display: block;
  margin-top: .25rem;
  font-size: .72rem;
  color: #678;
  line-height: 1.35;
}
.cmp-cta {
  appearance: none;
  border: 0;
  background: var(--secondary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  border-radius: .5rem;
  padding: .7rem .9rem;
  cursor: pointer;
  width: 100%;
  text-align: center;
  white-space: normal;
  line-height: 1.25;
}
.cmp-cta:hover { filter: brightness(1.05); }

#cmp-lead[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .cmp-modes { grid-template-columns: 1fr; }
  .cmp-filters { grid-template-columns: 1fr; }
  .cmp-tile {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .cmp-examples-grid { grid-template-columns: 1fr; }
}

/* Exemples SEO + guides */
.cmp-examples {
  margin: 2.5rem 0 1.5rem;
  padding: 1.5rem 0 0;
}
.cmp-examples h2,
.cmp-guides h2 {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  margin: 0 0 .75rem;
  color: var(--primary);
}
.cmp-examples-intro {
  margin: 0 0 1.25rem;
  font-size: .95rem;
  color: #456;
  line-height: 1.5;
  max-width: 48rem;
}
.cmp-examples-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  margin-bottom: 1rem;
}
.cmp-example {
  background: #fff;
  border: 1px solid #dbe3e3;
  border-radius: .75rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}
.cmp-example h3 {
  margin: 0 0 .25rem;
  font-size: 1rem;
  color: var(--primary);
}
.cmp-example-detail {
  margin: 0 0 .75rem;
  font-size: .85rem;
  color: #678;
}
.cmp-example-price {
  margin: 0;
  color: var(--secondary);
}
.cmp-example-price strong {
  font-size: 1.35rem;
}
.cmp-example-price span {
  font-size: .85rem;
  font-weight: 600;
}
.cmp-example-year {
  margin: .35rem 0 0;
  font-size: .8rem;
  color: #678;
}
.cmp-examples-note {
  margin: 0;
  font-size: .82rem;
  color: #678;
  line-height: 1.45;
}
.cmp-guides {
  margin: 0 0 2rem;
}
.cmp-guides-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .45rem;
}
.cmp-guides-list a {
  color: var(--secondary);
  font-weight: 600;
  text-decoration: none;
}
.cmp-guides-list a:hover { text-decoration: underline; }

/* Teaser prix home ASI */
.cmp-teaser {
  margin: 0;
  padding: 1.75rem 0;
  background: color-mix(in srgb, var(--secondary) 8%, #fff);
  border-top: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
}
.cmp-teaser .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}
.cmp-teaser-label {
  margin: 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary);
}
.cmp-teaser-price {
  margin: .25rem 0 0;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.2;
}
.cmp-teaser-price span {
  display: block;
  margin-top: .2rem;
  font-size: .85rem;
  font-weight: 500;
  color: #567;
}
@media (max-width: 560px) {
  .cmp-teaser .inner { flex-direction: column; align-items: flex-start; }
}

