/* ============================================================
   MelisClientArea — funnel public "Je veux…" (plugin de templating front).
   Scopé .mcaf, réutilise les couleurs du thème du site (--red-theme,
   --light-red-theme déjà déclarées globalement par red-theme.css) plutôt que
   d'inventer une nouvelle palette.
   ============================================================ */
/* Le header du site est en position:fixed (.header-wrapper, red-theme.css) et
   n'a AUCUN spacer global côté public (contrairement au rendu BO/melis, qui
   ajoute .header-menu-spacing) — chaque page se dégage elle-même. Toutes les
   bandes "hero" du site (home #hero-*, pages Partners/News/Legal *-hero dans
   melis-pages.css) utilisent 150px de padding-top desktop / 124px en dessous
   de 991px (palier du menu mobile) — même valeur reprise ici, le template
   DragDrop qui héberge ce plugin n'a lui-même aucun dégagement propre. */
.mcaf { max-width: 900px; margin: 0 auto; padding: 150px 16px 40px; position: relative; }
@media (max-width: 991px) { .mcaf { padding-top: 124px; } }
.mcaf * { box-sizing: border-box; }
.mcaf .mcaf-title { text-align: center; font-weight: 800; margin-bottom: 28px; }

/* Écran 1 — cartes presets */
.mcaf-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mcaf-card {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 22px 20px;
  min-height: 100px; cursor: pointer; text-align: left; text-decoration: none; color: #111;
  font-size: 15px; font-weight: 700; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.mcaf-card:hover { border-color: var(--red-theme); box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.mcaf-card--door {
  grid-column: span 3;
  background: linear-gradient(135deg, var(--red-theme), #b30000);
  color: #fff; border: none; min-height: 130px; font-size: 19px;
}
.mcaf-card--door .mcaf-card-tag {
  align-self: flex-start; background: rgba(255,255,255,.2); color: #fff; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; padding: 3px 10px; border-radius: 20px;
}
.mcaf-card--other { color: #6b7280; border-style: dashed; }
@media (min-width: 640px) { .mcaf-card--door { grid-column: span 1; } }
@media (max-width: 640px) { .mcaf-cards { grid-template-columns: 1fr; } .mcaf-card--door { grid-column: span 1; } }

/* Écran 2 — questions */
.mcaf-back { background: none; border: none; color: #6b7280; font-weight: 700; font-size: 13px; cursor: pointer; padding: 0 0 18px; }
.mcaf-back:hover { color: var(--red-theme); }
.mcaf-question { margin-bottom: 22px; }
.mcaf-question > p { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.mcaf-answers { display: flex; flex-wrap: wrap; gap: 8px; }
.mcaf-answer {
  border: 1px solid #d1d5db; background: #fff; border-radius: 20px; padding: 9px 18px;
  font-size: 13.5px; font-weight: 700; cursor: pointer; color: #374151; transition: .12s;
}
.mcaf-answer:hover { border-color: var(--red-theme); }
.mcaf-answer.is-selected { background: var(--red-theme); border-color: var(--red-theme); color: #fff; }

.mcaf-runtime { background: var(--light-red-theme); border-radius: 12px; padding: 16px 18px; margin: 8px 0 26px; }
.mcaf-runtime-reco { margin: 0; font-size: 14px; }
.mcaf-runtime-reco b { font-size: 16px; }
.mcaf-link { background: none; border: none; color: var(--red-theme); font-weight: 800; font-size: 13px; cursor: pointer; padding: 0; margin-left: 6px; }
.mcaf-runtime-slider { margin-top: 14px; }
.mcaf-runtime-slider input[type=range] { width: 100%; accent-color: var(--red-theme); }
.mcaf-runtime-slider-labels { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: #6b7280; margin-top: 2px; }

/* Options avancées — repliées par défaut, cf. commentaire funnel.phtml. Toujours
   visibles (contrairement à .mcaf-runtime, masqué si le preset a déjà sa propre
   question de dimensionnement), donc en dehors du bloc teinté --light-red-theme. */
.mcaf-advanced-wrap { margin: 8px 0 26px; }
.mcaf-advanced-wrap > .mcaf-link { display: block; margin: 0; }
.mcaf-advanced { margin-top: 12px; padding: 14px 16px; background: #f9fafb; border-radius: 12px; }
.mcaf-advanced-row { margin-bottom: 16px; }
.mcaf-advanced-row:last-child { margin-bottom: 0; }
.mcaf-advanced-row > label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.mcaf-advanced-row input[type=range] { width: 100%; accent-color: var(--red-theme); }
.mcaf-hint { font-size: 12.5px; color: #6b7280; margin: 6px 0 0; }

.mcaf-hosting-row { display: flex; align-items: flex-start; gap: 12px; }
.mcaf-hosting-label { flex: 1; display: flex; flex-direction: column; gap: 2px; margin: 0; cursor: default; }
.mcaf-hosting-label b { font-size: 13.5px; }
.mcaf-hosting-label--right { text-align: right; align-items: flex-end; }
.mcaf-toggle-switch { flex: none; margin-top: 3px; }
.mcaf-toggle-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mcaf-toggle-track { display: block; width: 42px; height: 24px; border-radius: 20px; background: #d1d5db; position: relative; transition: background .15s; }
.mcaf-toggle-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.mcaf-toggle-switch input:checked + .mcaf-toggle-track { background: var(--red-theme); }
.mcaf-toggle-switch input:checked + .mcaf-toggle-track .mcaf-toggle-thumb { transform: translateX(18px); }
.mcaf-dedicated-note { margin-top: 10px; font-weight: 700; color: var(--red-theme); }

.mcaf-cta { display: inline-block; border: none; border-radius: 10px; padding: 13px 26px; font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none; text-align: center; }

/* Écran 3 — un seul nombre */
.mcaf-screen--3 { text-align: center; }
.mcaf-price-label { color: #6b7280; font-weight: 700; margin-bottom: 4px; }
.mcaf-price { font-size: 44px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.mcaf-price small { font-size: 16px; font-weight: 700; color: #6b7280; }
.mcaf-savings { display: inline-block; background: #dcfce7; color: #15803d; font-weight: 800; font-size: 13px; padding: 6px 14px; border-radius: 20px; margin-bottom: 18px; }
.mcaf-implementation { margin: 0 0 26px; }
.mcaf-implementation-label { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.mcaf-implementation-answers { justify-content: center; }
.mcaf-actions { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 6px; flex-wrap: wrap; }
.mcaf-detail { text-align: left; margin-top: 22px; border-top: 1px solid #e5e7eb; padding-top: 18px; }
.mcaf-lines { list-style: none; margin: 0 0 12px; padding: 0; }
.mcaf-lines li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 6px 0; border-bottom: 1px dashed #e5e7eb; }
.mcaf-lines li b { font-variant-numeric: tabular-nums; }
.mcaf-explanation { list-style: none; margin: 0; padding: 0; }
.mcaf-explanation li { font-size: 13px; color: #15803d; font-weight: 700; padding: 3px 0; }

.mcaf-loading { position: absolute; inset: 0; background: rgba(255,255,255,.7); display: flex; align-items: center; justify-content: center; }
.mcaf-loading .mcaf-spin { width: 30px; height: 30px; border: 3px solid #e5e7eb; border-top-color: var(--red-theme); border-radius: 50%; animation: mcaf-spin .7s linear infinite; }
@keyframes mcaf-spin { to { transform: rotate(360deg); } }

[data-mcaf-screen][hidden] { display: none !important; }
