/* =============================================================
   🎂 ATELIER CRÉATIF SIMULATEUR DE GÂTEAUX SUR-MESURE (BABI 2026)
   ============================================================= */

:root {
    --cake-gold: #c2850c;
    --cake-gold-light: #fef3c7;
    --cake-chocolate: #2b160c;
    --cake-bg: #fbf9f4;
    --cake-card-bg: #ffffff;
    --cake-border: #e7dfd5;
}

body.cake-simulator-body {
    background-color: var(--cake-bg);
    color: var(--cake-chocolate);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* 1. TOP NAV */
.luxury-top-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--cake-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 24px;
    box-shadow: 0 2px 10px rgba(43, 22, 12, 0.05);
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(194, 133, 12, 0.2);
}

.brand-texts {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--cake-chocolate);
}

.brand-tagline {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--cake-gold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn-secondary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 9999px;
    background: #f4eee6;
    color: var(--cake-chocolate);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.nav-btn-secondary:hover {
    background: #ebe0d2;
}

.nav-btn-gold {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8px 12px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #c2850c 0%, #a16207 100%);
    color: #ffffff;
    text-decoration: none;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 800;
    border-radius: 9999px;
    padding: 2px 6px;
}

/* 2. HERO */
.simulator-hero {
    position: relative;
    padding: 40px 20px 30px;
    text-align: center;
    background: linear-gradient(135deg, #2b160c 0%, #170904 100%);
    color: #ffffff;
    overflow: hidden;
}

.simulator-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-sub-pill {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(245, 184, 0, 0.18);
    border: 1px solid rgba(245, 184, 0, 0.4);
    color: #fde68a;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    color: #fef3c7;
}

.hero-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #e2d7cb;
    margin: 0;
}

/* 3. SIMULATOR LAYOUT */
.simulator-container {
    max-width: 1300px;
    margin: 30px auto 60px;
    padding: 0 20px;
}

.simulator-layout-grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 32px;
    align-items: start;
}

/* Sticky Visualizer Column */
.visualizer-sticky-wrapper {
    position: sticky;
    top: 90px;
}

.cake-preview-card {
    background: #ffffff;
    border: 1px solid var(--cake-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(43, 22, 12, 0.08);
}

.cake-stage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3ece3;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #16a34a;
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.badge-portions {
    padding: 3px 10px;
    background: var(--cake-gold-light);
    color: #92400e;
    font-size: 11px;
    font-weight: 800;
    border-radius: 9999px;
}

/* 3D / CSS CAKE CANVAS */
.cake-canvas-container {
    height: 280px;
    background: radial-gradient(circle at center, #faf7f2 0%, #f0e7dc 100%);
    border-radius: 20px;
    border: 1px solid #e7ded3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.cake-topper {
    font-size: 24px;
    color: #d97706;
    margin-bottom: 4px;
    animation: bounceTopper 2s infinite;
}

@keyframes bounceTopper {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.cake-tier {
    position: relative;
    border-radius: 12px 12px 6px 6px;
    box-shadow: 0 6px 14px rgba(43, 22, 12, 0.18), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: -4px;
}

.cake-tier.tier-3 {
    width: 100px;
    height: 38px;
    z-index: 3;
    background: #fef08a;
}

.cake-tier.tier-2 {
    width: 150px;
    height: 48px;
    z-index: 2;
    background: #fef08a;
}

.cake-tier.tier-1 {
    width: 210px;
    height: 62px;
    z-index: 1;
    background: #fef08a;
}

.tier-message-banner {
    position: absolute;
    background: rgba(255, 255, 255, 0.92);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px dashed #c2850c;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    text-align: center;
}

#tierMessageText {
    font-family: 'Great Vibes', cursive;
    font-size: 16px;
    font-weight: 700;
    color: #2b160c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stand Platter */
.cake-stand {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 0;
    width: 250px;
}

.stand-platter {
    width: 240px;
    height: 10px;
    background: linear-gradient(180deg, #fef08a 0%, #d97706 50%, #92400e 100%);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.stand-base {
    width: 90px;
    height: 12px;
    background: linear-gradient(180deg, #d97706 0%, #78350f 100%);
    border-radius: 0 0 10px 10px;
}

/* PRICING & SUMMARY */
.cake-pricing-summary {
    margin-top: 20px;
    padding: 16px;
    background: #fdfaf6;
    border-radius: 16px;
    border: 1px solid #f0e6da;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pricing-divider {
    height: 1px;
    background: #e7dfd5;
    margin: 12px 0;
}

.pricing-total-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.total-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--cake-chocolate);
}

.total-price-tag {
    font-family: 'Playfair Display', serif;
    font-size: 1.45rem;
    font-weight: 900;
    color: #a16207;
    display: block;
}

.acompte-tag {
    font-size: 11px;
    font-weight: 800;
    color: #047857;
    background: #d1fae5;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 2px;
}

.btn-order-cake {
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    background: linear-gradient(135deg, #c2850c 0%, #9a3412 100%);
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(194, 133, 12, 0.35);
    transition: all 0.2s ease;
}

.btn-order-cake:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(194, 133, 12, 0.45);
}

/* 4. CONFIGURATOR PANEL & STEPS */
.configurator-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.config-step-card {
    background: #ffffff;
    border: 1px solid var(--cake-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(43, 22, 12, 0.03);
}

.step-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    background: var(--cake-gold);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    shrink: 0;
}

.step-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--cake-chocolate);
}

.step-desc {
    font-size: 0.8rem;
    color: #78716c;
    margin: 2px 0 0 0;
}

.config-label {
    font-size: 12px;
    font-weight: 700;
    color: #44403c;
    margin-bottom: 8px;
    display: block;
}

/* Options Grid */
.config-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.option-pill-card, .flavor-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1.5px solid #e7dfd5;
    border-radius: 12px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.18s ease;
}

.option-pill-card input, .flavor-card input {
    display: none;
}

.option-pill-card:hover, .flavor-card:hover {
    border-color: var(--cake-gold);
    background: #fdfaf6;
}

.option-pill-card.active, .flavor-card.active {
    border-color: var(--cake-gold);
    background: var(--cake-gold-light);
    box-shadow: 0 2px 8px rgba(194, 133, 12, 0.15);
}

.flavor-color {
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.option-name, .flavor-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--cake-chocolate);
}

/* Tiers Selector Buttons */
.tiers-selector-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.btn-tier-select {
    padding: 12px 10px;
    border-radius: 14px;
    border: 1.5px solid #e7dfd5;
    background: #ffffff;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: all 0.2s ease;
}

.btn-tier-select strong {
    font-size: 13px;
    color: var(--cake-chocolate);
}

.btn-tier-select span {
    font-size: 11px;
    color: #78716c;
}

.btn-tier-select.active {
    border-color: var(--cake-gold);
    background: var(--cake-gold-light);
    box-shadow: 0 4px 12px rgba(194, 133, 12, 0.18);
}

.btn-tier-select.active strong {
    color: #92400e;
}

/* Color Chips */
.color-palette-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-chip {
    width: 38px;
    height: 38px;
    border-radius: 9999px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.color-chip input {
    display: none;
}

.chip-check {
    display: none;
    font-size: 14px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.color-chip.active {
    transform: scale(1.15);
    border-color: var(--cake-gold);
}

.color-chip.active .chip-check {
    display: block;
}

/* Inputs & Checkboxes */
.luxury-input-field {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e7dfd5;
    border-radius: 12px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--cake-chocolate);
    background: #ffffff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.luxury-input-field:focus {
    border-color: var(--cake-gold);
    box-shadow: 0 0 0 3px rgba(194, 133, 12, 0.15);
}

.checkbox-option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1.5px solid #e7dfd5;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
}

.checkbox-option-card:hover {
    border-color: var(--cake-gold);
}

.opt-title {
    font-size: 13px;
    font-weight: 700;
    display: block;
    color: var(--cake-chocolate);
}

.opt-sub {
    font-size: 11px;
    color: #78716c;
}

.opt-price {
    font-size: 12.5px;
    font-weight: 800;
    color: #a16207;
}

/* 5. MODAL BOOKING */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(26, 12, 6, 0.72);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-backdrop.hidden {
    display: none;
}

.modal-box-luxury {
    background: #ffffff;
    border-radius: 24px;
    width: 580px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header-luxury {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0e6da;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.btn-close-modal {
    background: #f4eee6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
}

.modal-body-luxury {
    padding: 20px 24px;
}

.order-summary-box {
    background: var(--cake-gold-light);
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 12px 16px;
}

.form-label {
    font-size: 12px;
    font-weight: 700;
    color: #44403c;
    margin-bottom: 4px;
    display: block;
}

.pay-method-card {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1.5px solid #e7dfd5;
    border-radius: 12px;
    cursor: pointer;
}

.pay-method-card input {
    display: none;
}

.pay-method-card.active {
    border-color: #0284c7;
    background: #f0f9ff;
}

.btn-submit-order {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 9999px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

/* 6. MOBILE RESPONSIVENESS */
@media (max-width: 1023px) {
    .simulator-layout-grid {
        grid-template-columns: 1fr;
    }

    .visualizer-sticky-wrapper {
        position: static;
    }
}
