/* ============================================
   Mon Mariage Tahiti - v2.2 - Mobile-First
   Fix: iOS tap, touch feedback, no duplicates
   ============================================ */

/* -- VARIABLES -- */
:root {
    --mmt-bg: #1a1a1a;
    --mmt-surface: #242424;
    --mmt-surface-hover: #2e2e2e;
    --mmt-gold: #c9a84c;
    --mmt-gold-light: #e0c96e;
    --mmt-gold-dark: #a8893a;
    --mmt-text: #e8e6e1;
    --mmt-text-muted: #9a9a9a;
    --mmt-danger: #e74c3c;
    --mmt-success: #27ae60;
    --mmt-radius: 10px;
    --mmt-radius-sm: 6px;
    --mmt-shadow: 0 4px 20px rgba(0,0,0,.4);
}

/* -- RESET & WRAPPER -- */
.mmt-wrapper {
    background: var(--mmt-bg);
    color: var(--mmt-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 16px;
    border-radius: var(--mmt-radius);
    box-sizing: border-box;
    line-height: 1.5;
}
.mmt-wrapper *, .mmt-wrapper *::before, .mmt-wrapper *::after {
    box-sizing: border-box;
}

/* -- HEADER -- */
.mmt-header { text-align: center; margin-bottom: 24px; }
.mmt-header h2 {
    font-size: 22px; font-weight: 700; margin: 0 0 8px;
    color: var(--mmt-text); line-height: 1.3;
}
.mmt-gold { color: var(--mmt-gold); }
.mmt-subtitle { color: var(--mmt-text-muted); font-size: 14px; margin: 0; }

/* -- PROGRESS BAR -- */
.mmt-progress { margin-bottom: 16px; }
.mmt-progress-track {
    height: 4px; background: var(--mmt-surface);
    border-radius: 2px; overflow: hidden;
}
.mmt-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--mmt-gold), var(--mmt-gold-light));
    border-radius: 2px; transition: width .4s ease;
}

/* -- STEPS INDICATOR -- */
.mmt-steps-indicator {
    display: flex; justify-content: center; gap: 24px; margin-bottom: 24px;
}
.mmt-step-dot {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--mmt-text-muted); transition: color .3s;
}
.mmt-step-dot span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--mmt-surface); color: var(--mmt-text-muted);
    font-weight: 700; font-size: 12px; transition: all .3s;
}
.mmt-step-dot.active span {
    background: var(--mmt-gold); color: var(--mmt-bg);
}
.mmt-step-dot.active { color: var(--mmt-text); }
.mmt-step-dot.current span {
    box-shadow: 0 0 0 3px rgba(201,168,76,.3);
}

/* -- STEPS - hide inactive -- */
.mmt-step {
    display: none;
    animation: mmtFadeIn .35s ease;
}
.mmt-step.active {
    display: block;
}
@keyframes mmtFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* -- STEP TITLE -- */
.mmt-step-title {
    font-size: 18px; font-weight: 600; color: var(--mmt-gold);
    margin: 0 0 20px; text-align: center;
}

/* -- FIELDS -- */
.mmt-field {
    margin-bottom: 16px;
}
.mmt-field label {
    display: block; font-size: 14px; font-weight: 600;
    color: var(--mmt-text); margin-bottom: 6px;
}
.mmt-field label small {
    font-weight: 400; color: var(--mmt-text-muted);
}
.mmt-field input[type="text"],
.mmt-field input[type="email"],
.mmt-field input[type="tel"],
.mmt-field input[type="number"],
.mmt-field input[type="date"],
.mmt-field select {
    width: 100%; padding: 12px 14px;
    background: var(--mmt-surface); color: var(--mmt-text);
    border: 1px solid #444; border-radius: 8px;
    font-size: 15px; line-height: 1.4;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.mmt-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9a84c' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    min-height: 48px;
    white-space: normal;
    overflow: visible;
    text-overflow: ellipsis;
}
.mmt-field select option {
    background: var(--mmt-surface); color: var(--mmt-text); padding: 8px;
}
.mmt-field input:focus, .mmt-field select:focus {
    outline: none; border-color: var(--mmt-gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.mmt-field-hint {
    display: block; font-size: 12px; color: var(--mmt-text-muted); margin-top: 4px;
}

/* -- INVALID STATE -- */
.mmt-invalid {
    border-color: var(--mmt-danger) !important;
    box-shadow: 0 0 0 3px rgba(231,76,60,.15) !important;
}

/* -- FIELDS ROW (side by side) -- */
.mmt-fields-row {
    display: flex; gap: 12px;
}
.mmt-fields-row .mmt-field { flex: 1; }

/* -- STYLE CARDS -- */
.mmt-style-cards {
    display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px;
}
.mmt-style-card {
    background: var(--mmt-surface);
    border: 2px solid transparent;
    border-radius: var(--mmt-radius);
    padding: 16px;
    text-align: center;
    transition: all .25s;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(201, 168, 76, 0.2);
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}
.mmt-style-card:hover {
    background: var(--mmt-surface-hover);
    border-color: rgba(201,168,76,.3);
}
.mmt-style-card:active {
    transform: scale(0.97);
    background: var(--mmt-surface-hover);
}
.mmt-style-card.selected {
    border-color: var(--mmt-gold);
    background: rgba(201,168,76,.08);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.mmt-style-card-icon { font-size: 28px; margin-bottom: 8px; }
.mmt-style-card h4 {
    font-size: 16px; font-weight: 700; color: var(--mmt-gold);
    margin: 0 0 6px;
}
.mmt-style-card p {
    font-size: 13px; color: var(--mmt-text-muted); margin: 0; line-height: 1.4;
}

/* -- SHAKE ANIMATION -- */
@keyframes mmtShake {
    0%,100% { transform: translateX(0); }
    25%     { transform: translateX(-6px); }
    75%     { transform: translateX(6px); }
}
.mmt-shake { animation: mmtShake .4s ease; }

/* -- OPTIONS SECTION (checkboxes) -- */
.mmt-options-section {
    margin-top: 24px; padding-top: 20px; border-top: 1px solid #333;
}
.mmt-options-title {
    font-size: 15px; font-weight: 600; color: var(--mmt-text);
    margin: 0 0 14px;
}
.mmt-checkbox-field { margin-bottom: 12px; }
.mmt-checkbox-label {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; font-size: 14px; color: var(--mmt-text);
    padding: 10px 12px; background: var(--mmt-surface);
    border-radius: 8px; transition: background .2s;
    -webkit-tap-highlight-color: rgba(201, 168, 76, 0.1);
    touch-action: manipulation;
}
.mmt-checkbox-label:hover { background: var(--mmt-surface-hover); }
.mmt-checkbox-label input[type="checkbox"] {
    width: 20px; height: 20px; accent-color: var(--mmt-gold);
    flex-shrink: 0; cursor: pointer;
}
.mmt-conditional {
    margin: 8px 0 16px 0; padding: 14px;
    background: rgba(201,168,76,.05);
    border-left: 3px solid var(--mmt-gold);
    border-radius: 0 8px 8px 0;
    animation: mmtFadeIn .3s ease;
}

/* -- NAVIGATION BUTTONS -- */
.mmt-nav {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid #333;
}
.mmt-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px; border: none; border-radius: 8px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all .25s; text-decoration: none;
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(201, 168, 76, 0.2);
}
.mmt-btn-next {
    background: linear-gradient(135deg, var(--mmt-gold), var(--mmt-gold-light));
    color: var(--mmt-bg); margin-left: auto;
}
.mmt-btn-next:hover { transform: translateY(-1px); box-shadow: var(--mmt-shadow); }
.mmt-btn-prev {
    background: transparent; color: var(--mmt-text-muted);
    border: 1px solid #444; padding: 12px 20px;
}
.mmt-btn-prev:hover { color: var(--mmt-text); border-color: var(--mmt-text-muted); }
.mmt-btn-submit {
    background: linear-gradient(135deg, var(--mmt-gold), var(--mmt-gold-light));
    color: var(--mmt-bg); flex: 1;
}
.mmt-btn-submit:hover { transform: translateY(-1px); box-shadow: var(--mmt-shadow); }
.mmt-btn-submit:disabled {
    opacity: .6; cursor: not-allowed; transform: none;
}

/* -- LOADER -- */
.mmt-loader {
    flex-direction: column; align-items: center; justify-content: center;
    gap: 16px; padding: 48px 20px; text-align: center;
}
.mmt-spinner {
    width: 40px; height: 40px; border: 3px solid var(--mmt-surface);
    border-top-color: var(--mmt-gold); border-radius: 50%;
    animation: mmtSpin .8s linear infinite;
}
@keyframes mmtSpin { to { transform: rotate(360deg); } }

/* -- RESULTS -- */
.mmt-results-header { text-align: center; margin-bottom: 20px; }
.mmt-results-header h3 {
    font-size: 20px; font-weight: 700; color: var(--mmt-gold); margin: 0 0 6px;
}
.mmt-results-subtitle {
    font-size: 14px; color: var(--mmt-text-muted); margin: 0;
}

/* Comparison box */
.mmt-comparison {
    background: var(--mmt-surface); border-radius: var(--mmt-radius);
    padding: 16px; margin-bottom: 20px;
}
.mmt-comparison-row {
    display: flex; gap: 12px; margin-bottom: 12px;
}
.mmt-comparison-item {
    flex: 1; text-align: center; padding: 12px;
    background: var(--mmt-bg); border-radius: 8px;
}
.mmt-comp-label {
    display: block; font-size: 12px; color: var(--mmt-text-muted);
    margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px;
}
.mmt-comp-value {
    display: block; font-size: 18px; font-weight: 700; color: var(--mmt-text);
}
.mmt-comparison-ecart {
    font-size: 13px; line-height: 1.5; text-align: center; padding: 10px;
    background: var(--mmt-bg); border-radius: 8px;
}
.mmt-positive .mmt-comparison-ecart { border-left: 3px solid var(--mmt-success); }
.mmt-negative .mmt-comparison-ecart { border-left: 3px solid var(--mmt-danger); }

/* Result table */
.mmt-result-table {
    background: var(--mmt-surface); border-radius: var(--mmt-radius);
    padding: 16px; margin-bottom: 20px;
}
.mmt-result-table h4 {
    font-size: 15px; font-weight: 600; color: var(--mmt-gold);
    margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid #333;
}
.mmt-result-row {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.05);
    gap: 10px;
}
.mmt-result-row:last-of-type { border-bottom: none; }
.mmt-result-label {
    display: flex; align-items: flex-start; gap: 8px; flex: 1; min-width: 0;
}
.mmt-result-icon { font-size: 18px; flex-shrink: 0; line-height: 1.3; }
.mmt-result-label-text { min-width: 0; }
.mmt-result-label-text strong {
    display: block; font-size: 13px; color: var(--mmt-text); line-height: 1.3;
}
.mmt-result-label-text small {
    display: block; font-size: 11px; color: var(--mmt-text-muted);
    line-height: 1.3; word-wrap: break-word;
}
.mmt-result-value {
    text-align: right; flex-shrink: 0; display: flex;
    flex-direction: column; align-items: flex-end; gap: 3px;
}
.mmt-amount {
    font-size: 14px; font-weight: 700; color: var(--mmt-text); white-space: nowrap;
}
.mmt-result-total {
    display: flex; justify-content: space-between;
    padding: 14px 0 0; margin-top: 10px;
    border-top: 2px solid var(--mmt-gold);
    font-size: 16px; color: var(--mmt-gold);
}

/* Badges */
.mmt-badge {
    font-size: 10px; padding: 2px 6px; border-radius: 4px;
    font-weight: 600; white-space: nowrap;
}
.mmt-badge-green { background: rgba(39,174,96,.15); color: #27ae60; }
.mmt-badge-yellow { background: rgba(241,196,15,.15); color: #f1c40f; }
.mmt-badge-red { background: rgba(231,76,60,.15); color: #e74c3c; }

/* Photo recommendation */
.mmt-reco-box {
    background: rgba(201,168,76,.08);
    border: 1px solid rgba(201,168,76,.2);
    border-radius: var(--mmt-radius); padding: 16px; margin-bottom: 20px;
}
.mmt-reco-box h4 {
    font-size: 15px; color: var(--mmt-gold); margin: 0 0 8px;
}
.mmt-reco-box p {
    font-size: 13px; color: var(--mmt-text); margin: 0; line-height: 1.5;
}

/* Disclaimer */
.mmt-disclaimer {
    background: var(--mmt-surface); border-radius: var(--mmt-radius);
    padding: 16px; margin-bottom: 20px; font-size: 12px;
    color: var(--mmt-text-muted); line-height: 1.5;
}
.mmt-disclaimer h4 {
    font-size: 14px; color: var(--mmt-text); margin: 0 0 8px;
}
.mmt-disclaimer p { margin: 0 0 8px; }
.mmt-disclaimer p:last-child { margin-bottom: 0; }
.mmt-sources-note { font-style: italic; font-size: 11px; }

/* Results actions */
.mmt-results-actions {
    display: flex; gap: 12px; flex-wrap: wrap;
}
.mmt-btn-restart {
    background: var(--mmt-surface); color: var(--mmt-text);
    border: 1px solid #444; flex: 1; min-width: 140px;
}
.mmt-btn-restart:hover { border-color: var(--mmt-gold); color: var(--mmt-gold); }
.mmt-btn-contact {
    background: linear-gradient(135deg, var(--mmt-gold), var(--mmt-gold-light));
    color: var(--mmt-bg); flex: 1; min-width: 140px; text-align: center;
}
.mmt-btn-contact:hover { transform: translateY(-1px); box-shadow: var(--mmt-shadow); }

/* Surcharge row */
.mmt-surcharge-row {
    background: rgba(201,168,76,.05); margin: 6px -8px; padding: 10px 8px;
    border-radius: 6px;
}

/* RESPONSIVE - TABLET (600px+) */
@media (min-width: 600px) {
    .mmt-wrapper { padding: 32px 28px; }
    .mmt-header h2 { font-size: 26px; }
    .mmt-step-title { font-size: 20px; }
    .mmt-style-cards { flex-direction: row; }
    .mmt-style-card { flex: 1; }
    .mmt-comp-value { font-size: 22px; }
    .mmt-amount { font-size: 15px; }
    .mmt-result-label-text strong { font-size: 14px; }
    .mmt-result-label-text small { font-size: 12px; }
}

/* RESPONSIVE - SMALL MOBILE (380px-) */
@media (max-width: 380px) {
    .mmt-wrapper { padding: 16px 12px; }
    .mmt-header h2 { font-size: 19px; }
    .mmt-step-title { font-size: 16px; }
    .mmt-steps-indicator { gap: 14px; }
    .mmt-step-dot { font-size: 11px; }
    .mmt-step-dot span { width: 22px; height: 22px; font-size: 10px; }
    .mmt-btn { padding: 10px 16px; font-size: 14px; }
    .mmt-fields-row { flex-direction: column; gap: 0; }
    .mmt-comparison-row { flex-direction: column; }
    .mmt-comp-value { font-size: 16px; }
    .mmt-result-row { flex-direction: column; gap: 4px; }
    .mmt-result-value { align-items: flex-start; flex-direction: row; gap: 8px; }
}
