/* Forêt Câline — bloc de personnalisation "prénom" (fiche produit) */

@font-face { font-family: "fc-hailey";     src: url("/fonts/Hailey.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "fc-outside";    src: url("/fonts/OutsideRegularCD.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "fc-friendship"; src: url("/fonts/Our Friendship.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "fc-saturday";   src: url("/fonts/SaturdayRegularAS.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "fc-anime";      src: url("/fonts/Anime.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "fc-natural";    src: url("/fonts/Natural fence extra bold.otf") format("opentype"); font-display: swap; }

[data-font="hailey"]     { font-family: "fc-hailey", cursive; }
[data-font="outside"]    { font-family: "fc-outside", cursive; }
[data-font="friendship"] { font-family: "fc-friendship", cursive; }
[data-font="saturday"]   { font-family: "fc-saturday", cursive; }
[data-font="anime"]      { font-family: "fc-anime", cursive; }
[data-font="natural"]    { font-family: "fc-natural", cursive; }

.fc-perso {
  --fc-green: #75a175;
  --fc-green-dark: #4c724c;
  --fc-green-light: #eef4ee;
  --fc-border: #d9d9d9;
  --fc-error: #c0392b;
}

/* #product : même spécificité que les règles du thème (#product .product-variants > .product-variants-item) */
#product .fc-perso .fc-step,
.fc-perso .fc-step { display: block; margin: 0 0 1.25rem; }
#product .fc-perso .control-label.fc-step-title,
.fc-perso .fc-step-title {
  display: flex; align-items: center; gap: 8px;
  float: none; width: auto; margin: 0 0 .5rem; padding: 0;
  max-width: none; flex: none;
  font-size: 15px; font-weight: 600; color: #222;
}
.fc-perso .fc-step-num {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 22px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--fc-green); color: #fff; font-size: 12px; font-weight: 600;
}
.fc-perso-fields .fc-step-title { font-weight: 500; }
.fc-required { color: var(--fc-error); }

/* Étape 1 : avec / sans prénom */
.fc-choice { display: flex; gap: 10px; }
.fc-choice-btn {
  flex: 1; position: relative; margin: 0; cursor: pointer;
  padding: 10px 12px; text-align: center; font-size: 15px;
  border: 1px solid var(--fc-border); border-radius: 30px; background: #fff;
  transition: border-color .15s, background-color .15s;
}
.fc-choice-btn:hover { border-color: var(--fc-green); }
.fc-choice-btn.is-selected { border: 2px solid var(--fc-green); padding: 9px 11px; background: var(--fc-green-light); color: var(--fc-green-dark); font-weight: 600; }
.fc-choice-input, .fc-font-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.fc-choice-btn:focus-within, .fc-font:focus-within { outline: 2px solid var(--fc-green-dark); outline-offset: 2px; }

/* Étape 2 : prénom */
.fc-perso .fc-name-input {
  width: 100%; height: 46px; padding: 0 14px; font-size: 17px;
  border: 1px solid var(--fc-border); border-radius: 8px; background: #fff;
}
.fc-perso .fc-name-input:focus { border-color: var(--fc-green); box-shadow: 0 0 0 3px var(--fc-green-light); outline: none; }
.fc-perso .fc-name-input.has-error { border-color: var(--fc-error); box-shadow: 0 0 0 3px #fbe9e7; }
.fc-name-help { display: flex; justify-content: space-between; gap: 10px; min-height: 18px; margin-top: 4px; font-size: 13px; }
.fc-error { color: var(--fc-error); }
.fc-counter { color: #888; margin-left: auto; }

/* Étape 3 : écritures */
.fc-fonts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fc-font {
  position: relative; margin: 0; cursor: pointer; text-align: center;
  padding: 12px 6px 8px; border: 1px solid var(--fc-border); border-radius: 8px; background: #fff;
  transition: border-color .15s, background-color .15s;
}
.fc-font:hover { border-color: var(--fc-green); }
.fc-font.is-selected { border: 2px solid var(--fc-green); padding: 11px 5px 7px; background: var(--fc-green-light); }
.fc-font-preview {
  display: block; height: 64px; line-height: 64px; font-size: 24px; color: #222;
  white-space: nowrap; overflow: hidden;
}
.fc-font-name { display: block; margin-top: 4px; font-size: 12px; color: #777; }
.fc-font.is-selected .fc-font-name { color: var(--fc-green-dark); font-weight: 600; }

/* Récapitulatif */
#product .fc-perso .fc-recap,
.fc-recap { margin: 0 0 1rem; padding: 10px 12px; border-radius: 8px; background: #f5f5f3; font-size: 14px; color: #555; }
.fc-recap:empty { display: none; }
.fc-recap strong { color: #222; }

/* Bouton pendant l'enregistrement du prénom */
.add-to-cart.fc-loading { opacity: .6; cursor: progress; }

/* Mode "Sans prénom" */
#product .fc-perso.is-without .fc-step-name,
#product .fc-perso.is-without .fc-step-font,
.fc-perso.is-without .fc-step-name,
.fc-perso.is-without .fc-step-font { display: none; }

/* Le bloc d'origine des produits "Prénom + écriture" est vide : pas de marge parasite */
.product-customization:empty { display: none; }

@media (max-width: 575px) {
  .fc-fonts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Bandeau collant : les options se choisissent sur la fiche (prénom, écriture) */
body.fc-has-perso .an_stickyAddToCart-standart > *,
body.fc-has-perso .an_stickyAddToCart-select { visibility: hidden; }

