/* ================================================================
   Page Personnalisation – Compose ton Tiramisu
   ================================================================ */

/* ── Hero ── */
.perso-hero {
  padding: 40px 0 30px;
  text-align: center;
  background: linear-gradient(135deg, #fef8f5 0%, #fff 100%);
}
.perso-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.perso-highlight {
  background: linear-gradient(135deg, #ff7a42, #ff9a6c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.perso-subtitle {
  color: #6b7280;
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ── Layout 2 colonnes ── */
.perso-builder {
  padding: 20px 0 60px;
}
.perso-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 991px) {
  .perso-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ── Schéma visuel (pot) ── */
.perso-visual-wrap {
  position: sticky;
  top: 130px;
}
@media (max-width: 991px) {
  .perso-visual-wrap { position: static; }
}
.perso-visual {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  border: 1px solid #f0ebe8;
}
.perso-pot {
  border: 3px solid #1a1a2e;
  border-radius: 8px 8px 16px 16px;
  overflow: hidden;
  position: relative;
}
.perso-layer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  border-bottom: 1px dashed rgba(0,0,0,0.08);
}
.perso-layer:last-child {
  border-bottom: none;
}
.perso-layer-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  opacity: 0.7;
}
.perso-layer-value {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Couleurs par couche */
.perso-layer--creme {
  background: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}
.perso-layer--base {
  background: #e5e7eb;
  color: #6b7280;
}
.perso-layer--base.perso-layer--filled {
  background: linear-gradient(90deg, #d2a679 0%, #c08b5c 100%);
  color: #fff;
}
.perso-layer--base-mid {
  background: #e5e7eb;
  color: #6b7280;
}
.perso-layer--base-mid.perso-layer--filled {
  background: linear-gradient(90deg, #d2a679 0%, #c08b5c 100%);
  color: #fff;
}
.perso-layer--gout {
  background: #f3f4f6;
  color: #6b7280;
}
.perso-layer--gout.perso-layer--filled {
  background: linear-gradient(90deg, #fecaca 0%, #fca5a5 100%);
  color: #991b1b;
}
.perso-layer--gout-2 {
  background: #f3f4f6;
  color: #6b7280;
}
.perso-layer--gout-2.perso-layer--filled {
  background: linear-gradient(90deg, #c7d2fe 0%, #a5b4fc 100%);
  color: #3730a3;
}
.perso-layer--nappage {
  background: #f3f4f6;
  color: #9ca3af;
  min-height: 36px;
  padding: 10px 16px;
}
.perso-layer--nappage.perso-layer--filled {
  background: linear-gradient(90deg, #4a2c17 0%, #6b3a1f 100%);
  color: #fde68a;
}
.perso-visual-hint {
  text-align: center;
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 16px;
  margin-bottom: 0;
}
.perso-visual-hint i {
  color: #ff7a42;
}

/* ── Steps ── */
.perso-step {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #f0ebe8;
}
.perso-step-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.perso-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7a42, #ff9a6c);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.perso-step-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.perso-step-header p {
  font-size: 0.85rem;
  color: #9ca3af;
  margin: 0;
}
.perso-free-badge {
  display: inline-block;
  background: #10b981;
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 6px;
}

/* ── Options sélectionnables ── */
.perso-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.perso-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 100px;
  text-align: center;
  position: relative;
  font-family: inherit;
  color: #374151;
}
.perso-option:hover {
  border-color: #ff7a42;
  background: #fef8f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 122, 66, 0.12);
}
.perso-option.active {
  border-color: #ff7a42;
  background: linear-gradient(135deg, #fff5f0, #fff);
  box-shadow: 0 0 0 3px rgba(255, 122, 66, 0.15), 0 4px 16px rgba(255, 122, 66, 0.1);
}
.perso-option.active::after {
  content: '✓';
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ff7a42;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.perso-option-icon {
  font-size: 1.6rem;
  color: #ff7a42;
}
.perso-option-label {
  font-size: 0.88rem;
  font-weight: 700;
}
.perso-option-desc {
  font-size: 0.72rem;
  color: #9ca3af;
}

/* Mini-preview modèle */
.perso-model-preview {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 50px;
  height: 40px;
  justify-content: flex-end;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  padding: 3px;
  overflow: hidden;
}
.perso-option.active .perso-model-preview {
  border-color: #ff7a42;
}
.mp-layer {
  border-radius: 2px;
  flex: 1;
}
.perso-model-preview--2 .mp-layer:nth-child(1) { background: #fca5a5; }
.perso-model-preview--2 .mp-layer:nth-child(2) { background: #d2a679; }
.perso-model-preview--3 .mp-layer:nth-child(1) { background: #a5b4fc; }
.perso-model-preview--3 .mp-layer:nth-child(2) { background: #d2a679; }
.perso-model-preview--3 .mp-layer:nth-child(3) { background: #fca5a5; }

/* Options goût avec image */
.perso-options--gout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}
.perso-option--gout,
.perso-option--gout2 {
  min-width: 0;
  padding: 10px;
}
.perso-option--gout img,
.perso-option--gout2 img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f0ebe8;
  transition: border-color 0.2s ease, transform 0.3s ease;
}
.perso-option--gout.active img,
.perso-option--gout2.active img {
  border-color: #ff7a42;
  transform: scale(1.08);
}

/* Options nappage */
.perso-options--nappage .perso-option {
  min-width: 80px;
  padding: 12px;
}
.perso-options--nappage img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #f0ebe8;
}
.perso-options--nappage .perso-option.active img {
  border-color: #ff7a42;
}

/* ── Récap + Ajout panier ── */
.perso-summary {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-radius: 16px;
  padding: 0;
  margin-top: 8px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
  border: 1px solid #f0ebe8;
  overflow: hidden;
}
.perso-summary-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  gap: 20px;
}
.perso-summary-left h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.perso-summary-left p {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 0;
}
.perso-summary-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.perso-summary-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ff7a42;
}
.perso-add-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff7a42, #ff9a6c);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.perso-add-btn:hover {
  background: linear-gradient(135deg, #e5632e, #ff7a42);
  box-shadow: 0 6px 20px rgba(255, 122, 66, 0.35);
  transform: translateY(-2px);
}
.perso-add-btn:active {
  transform: translateY(0);
}

/* ── Step 3b animation ── */
.perso-step--gout2 {
  animation: fadeSlideIn 0.4s ease;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .perso-hero h1 { font-size: 1.6rem; }
  .perso-subtitle { font-size: 0.92rem; }
  .perso-step { padding: 18px; }
  .perso-summary-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .perso-summary-right {
    width: 100%;
    justify-content: space-between;
  }
  .perso-add-btn {
    flex: 1;
    justify-content: center;
  }
  .perso-options--gout {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .perso-options--gout {
    grid-template-columns: repeat(2, 1fr);
  }
  .perso-options--model {
    flex-direction: row;
  }
  .perso-option--model {
    flex: 1;
  }
}

/* ── Layout sans schéma visuel ── */
.perso-layout--no-visual {
  grid-template-columns: 1fr;
}

/* ── Promo banner ── */
.perso-promo-banner {
  background: linear-gradient(135deg, #ff7a42, #ff4e00);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.95rem;
}
.perso-promo-banner i {
  margin-right: 6px;
}

/* ── Multi-nappage toggle ── */
.perso-options--multi .perso-option--nappage.active {
  border-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5, #fff);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.perso-options--multi .perso-option--nappage.active::after {
  background: #10b981;
}
.perso-nappage-counter {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 8px;
  font-weight: 600;
}

/* ── Goût désactivé (même goût interdit) ── */
.perso-option--disabled {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.6);
}

/* ── Demande spéciale ── */
.perso-special-input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s ease;
}
.perso-special-input:focus {
  outline: none;
  border-color: #ff7a42;
  box-shadow: 0 0 0 3px rgba(255, 122, 66, 0.1);
}
.perso-special-input::placeholder {
  color: #9ca3af;
  font-size: 0.82rem;
}

/* ── Badges supplémentaires ── */
.perso-price-badge {
  display: inline-block;
  background: #f59e0b;
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 6px;
}
.perso-optional-badge {
  display: inline-block;
  background: #6b7280;
  color: #fff;
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Limite par commande ── */
.perso-limit-info {
  text-align: center;
  font-size: 0.78rem;
  color: #9ca3af;
  padding: 8px 0 4px;
  margin: 0;
  border-top: 1px solid #f0ebe8;
}

.perso-model-hint {
  font-size: 0.8rem !important;
  color: #6b7280 !important;
  margin-top: 6px !important;
  margin-bottom: 0 !important;
  max-width: 420px;
  line-height: 1.4;
}

.perso-option-caption {
  display: block;
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 2px;
  font-weight: 500;
}


/* ── Bouton désactivé ── */
.perso-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #9ca3af;
  box-shadow: none;
  transform: none;
}
