/* ============================================================
   Calixys ROI Calculator — Feuille de style
   Charte graphique : violet #534AB7 / #3C3489 · orange #F5A623
   ============================================================ */

/* ── Variables ── */
.cxroi-wrapper {
    --cx-purple:       #534AB7;
    --cx-purple-dark:  #3C3489;
    --cx-purple-deep:  #26215C;
    --cx-purple-light: #EEEDFE;
    --cx-purple-mid:   #AFA9EC;
    --cx-orange:       #F5A623;
    --cx-orange-dark:  #C8841A;
    --cx-orange-light: #FEF3DC;
    --cx-green:        #1D9E75;
    --cx-green-light:  #E1F5EE;
    --cx-red:          #E24B4A;
    --cx-red-light:    #FCEBEB;
    --cx-amber:        #BA7517;
    --cx-amber-light:  #FAEEDA;
    --cx-white:        #FFFFFF;
    --cx-bg:           #F8F7FF;
    --cx-text:         #1A1033;
    --cx-text-muted:   #6B6490;
    --cx-text-light:   #9B97B8;
    --cx-border:       rgba(83, 74, 183, 0.15);
    --cx-border-hover: rgba(83, 74, 183, 0.45);
    --cx-radius:       10px;
    --cx-radius-lg:    14px;
    --cx-shadow:       0 2px 16px rgba(60, 52, 137, 0.10);
}

/* ── Wrapper global ── */
.cxroi-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--cx-white);
    border-radius: var(--cx-radius-lg);
    border: 1px solid var(--cx-border);
    box-shadow: var(--cx-shadow);
    padding: 40px 44px;
    max-width: 760px;
    margin: 0 auto;
    color: var(--cx-text);
    line-height: 1.6;
}

@media (max-width: 600px) {
    .cxroi-wrapper { padding: 24px 18px; }
}

/* ── En-tête ── */
.cxroi-header {
    text-align: center;
    margin-bottom: 32px;
}

.cxroi-logo-bar {
    margin-bottom: 14px;
}

.cxroi-badge {
    display: inline-block;
    background: var(--cx-purple-deep);
    color: var(--cx-white);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 20px;
}

.cxroi-main-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--cx-purple-dark);
    margin: 0 0 8px;
    line-height: 1.25;
}

@media (max-width: 600px) {
    .cxroi-main-title { font-size: 20px; }
}

.cxroi-main-sub {
    font-size: 14px;
    color: var(--cx-text-muted);
    margin: 0;
}

/* ── Barre de progression ── */
.cxroi-progress-wrap {
    margin-bottom: 32px;
}

.cxroi-progress-bar {
    height: 4px;
    background: var(--cx-border);
    border-radius: 2px;
    overflow: hidden;
}

.cxroi-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cx-purple), var(--cx-orange));
    border-radius: 2px;
    width: 0%;
    transition: width 0.4s ease;
}

.cxroi-progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.cxroi-progress-info span {
    font-size: 12px;
    color: var(--cx-text-light);
}

.cxroi-progress-info strong {
    font-size: 12px;
    color: var(--cx-purple);
    font-weight: 600;
}

/* ── Étapes ── */
.cxroi-step {
    display: none;
    animation: cxroiFadeIn 0.3s ease;
}

.cxroi-step.on {
    display: block;
}

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

.cxroi-step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--cx-orange);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.cxroi-step-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--cx-purple-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .cxroi-step-title { font-size: 17px; }
}

.cxroi-step-sub {
    font-size: 13px;
    color: var(--cx-text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ── Benchmark pill ── */
.cxroi-bench {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--cx-purple-light);
    border: 1px solid var(--cx-purple-mid);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--cx-purple-dark);
    margin-bottom: 20px;
}

.cxroi-bench-icon {
    font-size: 15px;
    font-weight: 700;
    color: var(--cx-purple);
}

.cxroi-bench strong {
    color: var(--cx-purple-dark);
}

/* ── Grille d'options ── */
.cxroi-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 8px;
}

.cxroi-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.cxroi-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 520px) {
    .cxroi-grid-2,
    .cxroi-grid-3 { grid-template-columns: 1fr; }
}

/* ── Boutons option ── */
.cxroi-opt {
    background: var(--cx-white);
    border: 1.5px solid var(--cx-border);
    border-radius: var(--cx-radius);
    padding: 14px 16px;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cxroi-opt:hover {
    border-color: var(--cx-purple);
    background: var(--cx-purple-light);
}

.cxroi-opt.sel {
    border-color: var(--cx-purple);
    background: var(--cx-purple-light);
    box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.12);
}

.cxroi-opt-full {
    grid-column: 1 / -1;
}

.cxroi-opt-icon {
    font-size: 22px;
    line-height: 1;
    margin-bottom: 4px;
}

.cxroi-opt-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--cx-text);
    line-height: 1.3;
}

.cxroi-opt.sel .cxroi-opt-title {
    color: var(--cx-purple-dark);
}

.cxroi-opt-desc {
    font-size: 12px;
    color: var(--cx-text-muted);
    line-height: 1.4;
}

/* ── Sliders ── */
.cxroi-slider-block {
    margin-bottom: 16px;
}

.cxroi-slider-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.cxroi-slider-lbl {
    font-size: 13px;
    color: var(--cx-text-muted);
}

.cxroi-slider-val {
    font-size: 22px;
    font-weight: 700;
    color: var(--cx-purple-dark);
}

.cxroi-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--cx-purple) 0%, var(--cx-purple-light) 0%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: background 0.1s;
}

.cxroi-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--cx-purple);
    border: 3px solid var(--cx-white);
    box-shadow: 0 1px 6px rgba(83, 74, 183, 0.4);
    cursor: pointer;
    transition: transform 0.15s;
}

.cxroi-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.cxroi-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--cx-purple);
    border: 3px solid var(--cx-white);
    box-shadow: 0 1px 6px rgba(83, 74, 183, 0.4);
    cursor: pointer;
}

.cxroi-slider-ends {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--cx-text-light);
    margin-top: 5px;
}

/* ── Navigation ── */
.cxroi-nav {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.cxroi-btn-back {
    background: transparent;
    border: 1.5px solid var(--cx-border);
    border-radius: var(--cx-radius);
    padding: 11px 20px;
    font-size: 14px;
    cursor: pointer;
    color: var(--cx-text-muted);
    font-family: inherit;
    transition: all 0.15s;
}

.cxroi-btn-back:hover {
    background: var(--cx-bg);
    border-color: var(--cx-border-hover);
}

.cxroi-btn-next {
    flex: 1;
    background: var(--cx-purple);
    border: none;
    border-radius: var(--cx-radius);
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    color: var(--cx-white);
    font-family: inherit;
    transition: all 0.18s;
    letter-spacing: 0.01em;
}

.cxroi-btn-next:hover:not(:disabled) {
    background: var(--cx-purple-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(83, 74, 183, 0.35);
}

.cxroi-btn-next:disabled {
    background: #C8C5E8;
    cursor: not-allowed;
    color: #8E8ABF;
}

/* ═══════════════════════════════
   RÉSULTATS
═══════════════════════════════ */

.cxroi-results-header {
    margin-bottom: 20px;
}

.cxroi-results-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--cx-purple-dark);
    margin: 0 0 4px;
}

.cxroi-results-sub {
    font-size: 13px;
    color: var(--cx-text-muted);
    margin: 0;
}

/* Total hero */
.cxroi-total-box {
    background: linear-gradient(135deg, var(--cx-purple-deep) 0%, var(--cx-purple) 100%);
    border-radius: var(--cx-radius-lg);
    padding: 28px 30px;
    margin-bottom: 16px;
    color: var(--cx-white);
    position: relative;
    overflow: hidden;
}

.cxroi-total-box::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.cxroi-total-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
    margin-bottom: 8px;
    font-weight: 500;
}

.cxroi-total-value {
    font-size: 46px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

@media (max-width: 520px) {
    .cxroi-total-value { font-size: 34px; }
}

.cxroi-total-sub {
    font-size: 13px;
    opacity: 0.65;
    margin-top: 6px;
}

/* Breakdown cards */
.cxroi-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.cxroi-cost-card {
    background: var(--cx-white);
    border: 1px solid var(--cx-border);
    border-radius: var(--cx-radius);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.cxroi-cost-card.cx-accent-red {
    border-left: 4px solid var(--cx-red);
    border-radius: 0 var(--cx-radius) var(--cx-radius) 0;
    padding-left: 14px;
}

.cxroi-cost-card.cx-accent-amber {
    border-left: 4px solid var(--cx-orange);
    border-radius: 0 var(--cx-radius) var(--cx-radius) 0;
    padding-left: 14px;
}

.cxroi-cost-left { flex: 1; min-width: 0; }

.cxroi-cost-icon {
    font-size: 15px;
    margin-right: 6px;
}

.cxroi-cost-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--cx-text);
    margin-bottom: 3px;
}

.cxroi-cost-desc {
    font-size: 12px;
    color: var(--cx-text-muted);
    line-height: 1.5;
}

.cxroi-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 5px;
    letter-spacing: 0.04em;
}

.cxroi-tag-red {
    background: var(--cx-red-light);
    color: var(--cx-red);
}

.cxroi-tag-amber {
    background: var(--cx-amber-light);
    color: var(--cx-amber);
}

.cxroi-cost-amount {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    color: var(--cx-text);
}

.cxroi-cost-card.cx-accent-red .cxroi-cost-amount {
    color: #A32D2D;
}

.cxroi-cost-card.cx-accent-amber .cxroi-cost-amount {
    color: var(--cx-amber);
}

/* Encadré outil actuel */
.cxroi-tool-box {
    background: var(--cx-orange-light);
    border: 1.5px solid var(--cx-orange);
    border-radius: var(--cx-radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.cxroi-tool-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--cx-orange-dark);
    margin-bottom: 6px;
}

.cxroi-tool-content {
    font-size: 13px;
    color: var(--cx-text);
    line-height: 1.6;
}

.cxroi-tool-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--cx-orange-dark);
    margin-top: 4px;
}

/* Insights grid */
.cxroi-insights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

@media (max-width: 460px) {
    .cxroi-insights { grid-template-columns: 1fr; }
}

.cxroi-insight-card {
    background: var(--cx-bg);
    border-radius: var(--cx-radius);
    padding: 12px 14px;
    border: 1px solid var(--cx-border);
}

.cxroi-insight-label {
    font-size: 11px;
    color: var(--cx-text-light);
    margin-bottom: 3px;
}

.cxroi-insight-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--cx-purple-dark);
}

.cxroi-insight-sub {
    font-size: 11px;
    color: var(--cx-text-muted);
    margin-top: 2px;
    line-height: 1.4;
}

/* Savings box */
.cxroi-savings-box {
    background: #E8F8F3;
    border: 1.5px solid var(--cx-green);
    border-radius: var(--cx-radius-lg);
    padding: 20px 24px;
    margin-bottom: 12px;
}

.cxroi-savings-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #0F6E56;
    margin-bottom: 6px;
}

.cxroi-savings-value {
    font-size: 34px;
    font-weight: 800;
    color: #085041;
    line-height: 1.1;
}

.cxroi-savings-desc {
    font-size: 12px;
    color: #0F6E56;
    margin-top: 8px;
    line-height: 1.55;
}

/* Note sources */
.cxroi-note {
    font-size: 11px;
    color: var(--cx-text-light);
    line-height: 1.6;
    margin-bottom: 24px;
    font-style: italic;
}

/* CTA Box */
.cxroi-cta-box {
    background: var(--cx-purple-light);
    border-radius: var(--cx-radius-lg);
    padding: 28px 30px;
    text-align: center;
    border: 1px solid var(--cx-purple-mid);
}

.cxroi-cta-text {
    font-size: 15px;
    color: var(--cx-purple-dark);
    margin-bottom: 18px;
    font-weight: 500;
    line-height: 1.5;
}

.cxroi-cta-btn {
    display: inline-block;
    background: var(--cx-orange);
    color: var(--cx-white);
    font-size: 15px;
    font-weight: 700;
    padding: 14px 30px;
    border-radius: var(--cx-radius);
    text-decoration: none;
    transition: all 0.18s;
    margin: 5px 6px;
    letter-spacing: 0.01em;
}

.cxroi-cta-btn:hover {
    background: var(--cx-orange-dark);
    color: var(--cx-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(245, 166, 35, 0.4);
    text-decoration: none;
}

.cxroi-cta-btn-secondary {
    background: transparent;
    border: 2px solid var(--cx-purple);
    color: var(--cx-purple);
}

.cxroi-cta-btn-secondary:hover {
    background: var(--cx-purple);
    color: var(--cx-white);
    box-shadow: 0 5px 18px rgba(83, 74, 183, 0.3);
}

.cxroi-btn-restart {
    display: block;
    width: 100%;
    margin-top: 14px;
    background: transparent;
    border: none;
    font-size: 13px;
    color: var(--cx-text-light);
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cxroi-btn-restart:hover {
    color: var(--cx-purple);
}
