/* ============================================================
   PAGE FORFAIT (forfait.php) — créateur de forfait Stelvar+.
   Réutilise les tokens de site.css (var(--brand)…) et ses classes de
   formulaire (.form-grid, .form-actions, .form-message, .field-error).
   Préfixe .fc- = « forfait creator ». Aucune couleur en dur sauf l'ombre.
   ============================================================ */
.fc [hidden] { display: none !important; }

.fc-page { padding-top: 70px; }
.fc-shell { max-width: 700px; }
.fc-logo { display: block; height: clamp(44px, 6vw, 62px); width: auto; margin: 0 0 22px -4px; }
.fc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.fc-done { justify-content: center; margin-top: 26px; }

/* ---- progression + en-tête d'étape ---- */
.fc-bar { display: flex; gap: 8px; margin: 6px 0 34px; }
.fc-bar i { flex: 1; height: 4px; border-radius: 4px; background: var(--border); transition: background .3s ease; }
.fc-bar i.is-done { background: var(--brand); }
.fc-count { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.fc-title { margin: 0 0 12px; font-size: clamp(32px, 4vw, 48px); }
.fc-title.is-alone { margin-bottom: 28px; }
.fc-help { margin: 0 0 24px; font-size: 15px; line-height: 1.6; color: var(--muted); max-width: 58ch; }
.fc-note { font-size: 12.5px; line-height: 1.5; color: var(--muted-2); }
.fc-h { margin: 0 0 6px; font-size: 18px; font-stretch: 75%; text-transform: uppercase; font-weight: 900; }

/* ---- forfait : barre de choix et limites (verrous) ---- */
.fc-plans { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; }
.fc-plans-label { margin-right: 4px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.fc-limit { margin: 14px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.fc-link { margin-left: 4px; padding: 0; border: 0; background: none; font: inherit; font-weight: 500; cursor: pointer; }
.fc-lock { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--brand); pointer-events: none; }
.fc-lock svg { width: 14px; height: 14px; }
.fc-lock-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13px; color: var(--brand); border-radius: 8px; }
.fc-lock-btn svg { width: 14px; height: 14px; }
.fc-tile.is-locked { opacity: .55; border-style: dashed; }
.fc-tile.is-locked:hover { opacity: .9; transform: none; border-color: var(--border); }

/* ---- nombres modifiables au clavier ---- */
.fc-num-input, .fc-mini-input { -moz-appearance: textfield; appearance: textfield; border: 0; background: transparent; color: inherit; font: inherit; text-align: center; }
.fc-num-input::-webkit-inner-spin-button, .fc-num-input::-webkit-outer-spin-button,
.fc-mini-input::-webkit-inner-spin-button, .fc-mini-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.fc-num-input { width: 3.2em; padding: 0; border-bottom: 2px solid var(--border-gold); font-size: 60px; font-stretch: 75%; font-weight: 900; line-height: 1.1; }
.fc-num-input:focus, .fc-mini-input:focus { outline: 0; border-bottom-color: var(--brand); color: var(--brand); }
.fc-mini-input { position: relative; z-index: 2; width: 58px; padding: 2px 0; border-bottom: 2px solid var(--border); font-size: 17px; font-weight: 800; }
.fc-plans [data-plan][hidden], .fc-bar i[hidden] { display: none; }
.fc [data-gest-cartes] { margin-top: 44px; }

/* ---- étape 1 : liste de choix ---- */
.fc-list { display: grid; gap: 10px; }
.fc-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  cursor: pointer;
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  transition: transform .2s ease, border-color .2s ease, background .25s ease;
  border-radius: 10px;
}
.fc-row:hover { border-color: var(--text); transform: translateY(-2px); }
.fc-row.is-active { border-color: var(--brand); background: var(--brand-soft); }
.fc-row-ic { display: flex; width: 26px; color: var(--muted-2); transition: color .25s ease; }
.fc-row-ic svg { width: 26px; height: 26px; }
.fc-row.is-active .fc-row-ic { color: var(--brand); }
.fc-row-txt { flex: 1; min-width: 0; }
.fc-row-txt b { display: block; font-size: 16px; font-weight: 700; }
.fc-row-txt small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--muted); }
.fc-radio { position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--muted-2); transition: border-color .25s ease, background .25s ease; }
.fc-radio::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--on-brand); transform: scale(0); transition: transform .25s ease; }
.fc-row.is-active .fc-radio { border-color: var(--brand); background: var(--brand); }
.fc-row.is-active .fc-radio::after { transform: scale(1); }

/* ---- étape des liens : cases à cocher ---- */
.fc-box {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  border: 2px solid var(--muted-2);
  transition: border-color .25s ease, background .25s ease;
}
.fc-box::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid var(--on-brand); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .2s ease; }
.fc-row.is-active .fc-box { border-color: var(--brand); background: var(--brand); }
.fc-row.is-active .fc-box::after { transform: rotate(45deg) scale(1); }
.fc-tag {
  flex: none;
  padding: 4px 10px;
  background: var(--brand-soft);
  border: 1px solid var(--border-gold);
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  border-radius: 6px;
}
.fc-row.is-fixed { cursor: default; }
.fc-row.is-fixed:hover { border-color: var(--brand); }
.fc-row.is-locked { opacity: .5; cursor: not-allowed; border-style: dashed; }
.fc-row.is-locked:hover { border-color: var(--border); transform: none; }
.fc-row-contact { margin-top: 14px; }
.fc-row-contact.is-upgrade { cursor: pointer; opacity: .65; border-style: dashed; }
.fc-row-contact.is-upgrade:hover { border-color: var(--border-gold); opacity: 1; }

/* ---- curseurs (emplacements, cartes) ---- */
.fc-slider { max-width: 560px; }
.fc-slider-cartes { margin-top: 28px; }
.fc-num { margin: 0 0 18px; font-size: 22px; font-weight: 700; color: var(--muted); }
.fc-num b { margin-right: 8px; font-size: 76px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--text); }
.fc-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--brand) var(--pct, 30%), var(--border) var(--pct, 30%));
}
.fc-range::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); border: 4px solid var(--bg); box-shadow: 0 0 0 2px var(--brand), 0 6px 20px rgba(243, 210, 79, 0.4); cursor: grab; }
.fc-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); border: 4px solid var(--bg); box-shadow: 0 0 0 2px var(--brand); cursor: grab; }
.fc-range:focus-visible { box-shadow: 0 0 0 4px var(--brand-ring); }

/* ---- étape 3 : tuiles de format avec compteur ---- */
.fc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fc-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  min-height: 190px;
  padding: 22px 12px 18px;
  text-align: center;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  transition: transform .2s ease, border-color .2s ease, background .25s ease, box-shadow .25s ease, color .25s ease;
  border-radius: 10px;
}
.fc-tile:hover { border-color: var(--text); color: var(--text); transform: translateY(-2px); }
.fc-tile.is-active { border-color: var(--brand); background: var(--brand-soft); color: var(--text); box-shadow: 0 0 0 1px var(--brand), 0 16px 44px rgba(243, 210, 79, 0.12); }
.fc-tile-hit { position: absolute; inset: 0; width: 100%; height: 100%; border: none; background: none; border-radius: inherit; cursor: pointer; }
.fc-tile-hit:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.fc-plaque { flex: none; color: var(--muted-2); pointer-events: none; transition: color .25s ease; }
.fc-tile.is-active .fc-plaque { color: var(--brand); }
.fc-tile-txt { display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.fc-tile-txt b { font-size: 15px; font-weight: 700; }
.fc-tile-txt small { font-size: 12.5px; font-weight: 500; color: var(--muted-2); }
.fc-check {
  position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; pointer-events: none;
  display: flex; align-items: center; justify-content: center; background: var(--brand); color: var(--on-brand);
  opacity: 0; transform: scale(.5); transition: opacity .25s ease, transform .25s ease;
}
.fc-tile.is-active .fc-check { opacity: 1; transform: none; }

/* compteur − / + (formats, comptoir) */
.fc-mini { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 12px; }
.fc-mini button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  border: 1px solid var(--border-gold);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 20px;
  font-weight: 700;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease, opacity .2s ease;
}
.fc-mini button:hover { background: transparent; color: inherit; transform: translateY(-2px); border-color: var(--text); }
.fc-mini button.is-off { opacity: .28; cursor: default; }
.fc-mini button.is-off:hover { background: transparent; color: inherit; transform: translateY(-2px); border-color: var(--text); }
.fc-mini b { min-width: 24px; text-align: center; font-size: 20px; font-weight: 800; color: var(--text); }
.fc-tile.is-active .fc-mini b { color: var(--brand); }

/* ---- puces de choix (cartes, facturation, options) ---- */
.fc-chip {
  cursor: pointer;
  padding: 10px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
  border-radius: 8px;
}
.fc-chip:hover { border-color: var(--text); color: var(--text); transform: translateY(-2px); }
.fc-chip.is-active { border-color: var(--border-gold); background: var(--brand-soft); color: var(--brand); }
.fc-row-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* ---- étape 5 : design ---- */
.fc-file {
  display: block;
  padding: 18px;
  border: 1px dashed var(--border-gold);
  background: var(--brand-soft);
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
}
.fc-file b { color: var(--text); }
.fc-file input { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.fc-colors-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.fc-colors { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.fc-colors label { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.fc-colors input { width: 120px; height: 42px; padding: 3px; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.fc-textarea {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  resize: vertical;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  border-radius: 8px;
}
.fc-textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }

/* ---- dernière étape : avantages, options, estimation ---- */
.fc-block { margin-top: 36px; }
.fc-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 6px; }
.fc-benefit { padding: 18px; border: 1px solid var(--border); background: var(--surface-soft); border-radius: 14px; }
.fc-benefit-ic { display: block; width: 22px; height: 22px; margin-bottom: 10px; color: var(--brand); }
.fc-benefit-ic svg { width: 22px; height: 22px; }
.fc-benefit h4 { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.fc-benefit p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }

.fc-more { margin-top: 30px; }
.fc-more summary { cursor: pointer; list-style: none; font-size: 15px; font-weight: 700; color: var(--brand); }
.fc-more summary::-webkit-details-marker { display: none; }
.fc-more[open] summary { margin-bottom: 14px; }
.fc-more-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.fc-more-item p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.fc-sum { margin-top: 40px; transition: opacity .2s ease; }
.fc-sum:empty { display: none; }
.fc-sum.is-loading { opacity: .55; }
.fc-sum-title { margin: 0 0 14px; font-size: 20px; font-stretch: 75%; text-transform: uppercase; font-weight: 900; }
.fc-i {
  position: relative; z-index: 2; width: 18px; height: 18px; margin-left: 8px; padding: 0; cursor: pointer; vertical-align: 1px;
  border-radius: 50%; border: 1px solid var(--brand); background: transparent; color: var(--brand); font: 800 11px/1 var(--font);
}
.fc-i[aria-expanded="true"] { background: var(--brand); color: var(--on-brand); }
/* Pop-up par-dessus le texte (même style que le « i » des forfaits) */
.fc-tl-row:has(.fc-pop) { position: relative; }
.fc-pop {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 3;
  padding: 14px;
  border: 1px solid var(--border-gold);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .75);
  text-align: left;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--muted);
  border-radius: 14px;
}
.fc-pop[hidden] { display: none; }
.fc-pop::before { content: ""; position: absolute; top: -6px; left: var(--tip, 50%); width: 10px; height: 10px; background: var(--surface); border-left: 1px solid var(--border-gold); border-top: 1px solid var(--border-gold); transform: rotate(45deg); }
.fc-pop strong { display: block; margin-bottom: 6px; font-size: 13.5px; color: var(--text); }
.fc-pop ul { margin: 6px 0; padding-left: 18px; }
.fc-pop p { margin: 6px 0 0; }

/* ---- estimation en chronologie : aujourd'hui → livraison → ensuite ---- */
.fc-tl-step { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding-bottom: 28px; }
.fc-tl-step:last-child { padding-bottom: 0; }
.fc-tl-step::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--border-gold), var(--border)); }
.fc-tl-step:last-child::before { display: none; }
.fc-tl-node { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-gold); background: var(--bg); color: var(--brand); }
.fc-tl-node svg { width: 22px; height: 22px; }
.fc-tl-step.is-now .fc-tl-node { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.fc-tl-body { min-width: 0; padding-top: 2px; }
.fc-tl-when { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.fc-tl-amount { display: flex; align-items: baseline; gap: 12px; margin: 2px 0 0; }
.fc-tl-amount strong {
  font-size: clamp(30px, 7vw, 38px);
  white-space: nowrap;
}
.fc-tl-amount small { font-size: 14px; font-weight: 600; color: var(--muted); }
.fc-tl-text { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
/* avantage membre : une pastille sobre, juste sous le total */
.fc-member {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border-gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--brand);
  border-radius: 6px;
}
.fc-member svg { width: 15px; height: 15px; }
.fc-tl-card { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--border-gold); background: var(--brand-soft); border-radius: 14px; }
.fc-tl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 13.5px; color: var(--muted); }
.fc-tl-row b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.fc-submit { width: 100%; justify-content: center; }

/* ---- navigation entre les étapes ---- */
.fc-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 34px; }
.fc-back { padding: 10px 4px; border: none; background: none; cursor: pointer; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); }
.fc-back:hover { color: var(--text); }

@media (max-width: 640px) {
  .fc-tiles { grid-template-columns: 1fr; }
  .fc-tile { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; min-height: 0; padding: 18px; text-align: left; gap: 12px 16px; }
  .fc-tile-txt { flex: 1 1 0; min-width: 0; align-items: flex-start; }
  .fc-tile .fc-mini { flex-basis: 100%; justify-content: center; }
  .fc-num b { font-size: 60px; }
}

.fc-design-img { display: block; width: 100%; max-width: 280px; height: auto; margin: 0 0 22px; }
