/* upncoptions — Front : design pro pour les options personnalisables */

/* Mention discrète quand l'option Portions remplace le qty stepper */
.upn-multi-hint {
  margin: 1rem 0 0;
  padding: 0.65rem 0.9rem;
  font-family: var(--serif, "Cormorant Garamond", Georgia, serif);
  font-style: italic;
  font-size: 0.825rem;
  color: var(--ink-soft, #8a7f78);
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 0.85rem;
}

/* Label TTC à droite du prix total */
.total-price .val { display: flex; align-items: baseline; justify-content: flex-end; gap: 0.45rem; }
.total-price .val .ttc-label {
  font-family: var(--sans, system-ui);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft, #8a7f78);
  align-self: center;
  margin-bottom: 0.15rem;
}

.upn-options-wrap { margin: 1.5rem 0; }
.upn-options-wrap .upn-option { margin-bottom: 1.75rem; }
.upn-options-wrap .upn-option h4 {
  font-family: var(--sans) !important;
  font-weight: 500 !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  color: var(--ink) !important;
  margin: 0 0 0.9rem !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
}
.upn-options-wrap .upn-option h4 small {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  font-weight: 400;
}

/* ======================================================================
   PORTIONS — cards éditoriales, style premium
   ====================================================================== */
.upn-portions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.upn-portions input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.upn-portions label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.95rem;
  min-width: 4rem;
  background: #fcfaf6;
  border: 1px solid #e8e0d2;
  border-radius: 2px;
  color: var(--ink, #2b2522);
  font-family: var(--sans, system-ui);
  font-size: 0.825rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}
.upn-portions label:hover {
  background: #fff;
  border-color: #c9a86a;
  color: #8a651a;
}
.upn-portions input[type="radio"]:checked + label {
  background: #2b2522;
  color: #fcfaf6;
  border-color: #2b2522;
}
.upn-portions input[type="radio"]:focus-visible + label {
  outline: 2px solid #c9a86a;
  outline-offset: 2px;
}
.upn-portion-label {
  display: block;
  font-weight: 400;
}
.upn-portions-note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #6b6b6b;
  font-style: italic;
}
.upn-portions-note a {
  color: inherit;
  text-decoration: underline;
}
.upn-portions-note a:hover {
  color: #c9a86a;
}

/* ======================================================================
   COLOR / RADIO — pastilles + label
   ====================================================================== */
.upn-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.upn-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.upn-radio label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 5.5rem;
  padding: 0.85rem 1rem;
  background: #fcfaf6;
  border: 1px solid #e8e0d2;
  border-radius: 3px;
  color: var(--ink, #2b2522);
  font-family: var(--serif, "Cormorant Garamond", Georgia, serif);
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.3;
  cursor: pointer;
  transition: all 0.25s ease;
}
.upn-radio label:hover { border-color: #c9a86a; background: #fff; }
.upn-radio input[type="radio"]:checked + label {
  border-color: #c9a86a;
  background: #fff;
  box-shadow: 0 0 0 1px #c9a86a inset;
}
.upn-radio .dot {
  display: inline-block;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.upn-radio .name { display: block; }
.upn-radio .name small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--ink-soft, #8a7f78);
  font-style: italic;
}

/* ======================================================================
   CHECKBOX
   ====================================================================== */
.upn-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.upn-checks input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.upn-checks label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 5.5rem;
  padding: 0.85rem 1rem;
  background: #fcfaf6;
  border: 1px solid #e8e0d2;
  border-radius: 3px;
  color: var(--ink, #2b2522);
  font-family: var(--serif, "Cormorant Garamond", Georgia, serif);
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.3;
  cursor: pointer;
  transition: all 0.25s ease;
}
.upn-checks label:hover { border-color: #c9a86a; background: #fff; }
.upn-checks input[type="checkbox"]:checked + label {
  border-color: #c9a86a;
  background: #fff;
  box-shadow: 0 0 0 1px #c9a86a inset;
}
.upn-checks .name { display: block; }
.upn-checks .name small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--ink-soft, #8a7f78);
  font-style: italic;
}
.upn-max-note {
  margin: 0 0 0.5rem 0;
  font-size: 0.85rem;
  color: var(--ink-soft, #8a7f78);
}

/* ======================================================================
   TEXTBOX
   ====================================================================== */
.upn-textbox { margin-top: 0.75rem; }
.upn-textbox .upn-text-choice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0;
  cursor: pointer;
  font-family: var(--sans, system-ui);
  font-size: 0.9rem;
  color: var(--ink, #2b2522);
}
.upn-textbox .upn-text-choice input[type="radio"] { accent-color: #c9a86a; }
.upn-textbox .upn-text-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: #fcfaf6;
  border: 1px solid #e8e0d2;
  border-radius: 3px;
  font-family: var(--serif, "Cormorant Garamond", Georgia, serif);
  font-size: 1rem;
  color: var(--ink, #2b2522);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.upn-textbox .upn-text-input:focus {
  outline: none;
  border-color: #c9a86a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.12);
}
.upn-textbox em { color: var(--ink-soft, #8a7f78); font-style: italic; font-size: 0.8rem; }
/* Mode input direct : radio unique masqué mais présent dans le DOM pour la soumission */
.upn-textbox .upn-text-choice-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
/* Mode numérique CSV : champ compact (ex. "20,30") */
.upn-textbox .upn-text-input[data-numeric-csv="1"] {
  max-width: 10rem;
  text-align: center;
}


/* === UPN COLLAPSIBLE ACCORDION (v1.2.3) === */
.upn-options-wrap details.upn-collapsible {
  border: 0;
  border-top: 1px solid rgba(43,37,34,.10);
  margin: 0;
  padding: 0;
}
.upn-options-wrap details.upn-collapsible:last-of-type {
  border-bottom: 1px solid rgba(43,37,34,.10);
}
.upn-options-wrap details.upn-collapsible > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  user-select: none;
  gap: 1rem;
}
.upn-options-wrap details.upn-collapsible > summary::-webkit-details-marker { display: none; }
.upn-options-wrap details.upn-collapsible > summary::marker { content: ""; }
.upn-options-wrap details.upn-collapsible > summary h4 {
  margin: 0 !important;
  font-family: var(--serif) !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: 1.15rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--ink) !important;
  display: inline-flex !important;
  align-items: baseline !important;
  gap: .35rem !important;
}
.upn-options-wrap details.upn-collapsible > summary .upn-chevron {
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft, #7a6f66);
  transition: transform .25s ease;
  flex-shrink: 0;
}
.upn-options-wrap details.upn-collapsible[open] > summary .upn-chevron {
  transform: rotate(180deg);
}
.upn-options-wrap details.upn-collapsible > .upn-option-body {
  padding: 0 0 1.1rem;
}

/* Variante statique (Nombre de personnes) : toujours ouvert, chevron caché, curseur normal */
.upn-options-wrap details.upn-collapsible.is-static > summary {
  cursor: default;
  pointer-events: none;
}
.upn-options-wrap details.upn-collapsible.is-static > summary .upn-chevron { display: none; }
