:root {
    --dc-bg: #f8fafc;
    --dc-surface: #ffffff;
    --dc-border: #e5e7eb;
    --dc-text: #111827;
    --dc-text-soft: #6b7280;
    --dc-primary: #6366f1;
    --dc-primary-hover: #4f46e5;
    --dc-primary-soft: rgba(99, 102, 241, 0.12);
    --dc-success-bg: #ecfdf5;
    --dc-success-text: #065f46;
    --dc-error-bg: #fee2e2;
    --dc-error-text: #991b1b;
    --dc-shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.04);
    --dc-radius-sm: 10px;
    --dc-radius-md: 14px;
    --dc-radius-lg: 16px;
}

body {
    background: var(--dc-bg);
}
body.admin-bar .dc-topbar {
    top: 48px;
}

#dc-app {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 12px;
    font-family: Inter, Arial, sans-serif;
    color: var(--dc-text);
}

#dc-main {
    width: 100%;
}

/* Titres / textes */
#dc-content h2 {
    margin: 0 0 18px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--dc-text);
    text-align: center;
}

#dc-content h3 {
    margin: 0;
}

#dc-content p {
    color: var(--dc-text-soft);
    line-height: 1.5;
    text-align: center;
}

/* Boutons */
button {
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.dc-primary-btn,
.dc-back-btn {
    border: none;
    border-radius: var(--dc-radius-sm);
    box-shadow: var(--dc-shadow-sm);
}

.dc-primary-btn {
    width: 100%;
    padding: 14px 18px;
    margin-top: 12px;
    background: var(--dc-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}

.dc-primary-btn:hover {
    background: var(--dc-primary-hover);
    transform: translateY(-1px);
}

.dc-primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.dc-back-btn {
    width: auto;
    padding: 10px 14px;
    margin: 0 0 16px;
    background: var(--dc-surface);
    color: var(--dc-text);
    border: 1px solid var(--dc-border);
}

.dc-back-btn:hover {
    transform: translateY(-1px);
    border-color: #c7d2fe;
}

/* Barre de progression */
.dc-topbar {
    position: sticky;
    top: 16px;
    z-index: 20;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.dc-topbar__progress {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
}

.dc-topbar__total {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

#dc-progress {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 0;
}

#dc-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.35s ease;
}

.dc-total-bar__label {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--dc-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

.dc-total-bar__amount {
    flex: 0 0 96px;
    width: 96px;
    text-align: right;
    font-size: 22px;
    font-weight: 800;
    color: var(--dc-text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* Checkboxes */
.dc-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    margin-bottom: 20px;
}

.dc-option {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 14px 16px;
    background: var(--dc-surface);
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius-md);
    box-shadow: var(--dc-shadow-sm);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dc-option:hover {
    transform: translateY(-1px);
    border-color: #c7d2fe;
}

.dc-option input {
    transform: scale(1.1);
}

.dc-option span {
    color: var(--dc-text);
    font-size: 15px;
}

/* Récap */
.dc-recap {
    background: var(--dc-surface);
    padding: 18px;
    border-radius: var(--dc-radius-lg);
    border: 1px solid var(--dc-border);
    box-shadow: var(--dc-shadow-sm);
    margin-bottom: 20px;
}

.dc-recap p {
    margin: 0 0 10px;
    font-size: 15px;
}

.dc-recap p:last-child {
    margin-bottom: 0;
}

.dc-recap strong {
    color: var(--dc-text);
}

.dc-amount {
    margin: 20px 0 10px;
    font-size: 34px;
    line-height: 1;
    font-weight: 800;
    color: var(--dc-text);
    text-align: center;
}

/* États */
.dc-error {
    background: var(--dc-error-bg);
    color: var(--dc-error-text);
    padding: 14px 16px;
    border-radius: var(--dc-radius-md);
    border: 1px solid rgba(153, 27, 27, 0.12);
}

.dc-success {
    background: var(--dc-success-bg);
    color: var(--dc-success-text);
    padding: 22px;
    border-radius: var(--dc-radius-lg);
    border: 1px solid rgba(6, 95, 70, 0.12);
}

.dc-success h2 {
    margin-bottom: 10px;
}

/* Animation */
.fade {
    animation: fade 0.28s ease;
}

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

/* Responsive */
@media (max-width: 900px) {
    #dc-app {
        margin: 24px auto;
    }

    #dc-content h2 {
        font-size: 24px;
    }

    .dc-amount {
        font-size: 30px;
    }
}

@media (max-width: 782px) {
    .dc-topbar {
        top: 10px;
    }
}

@media (max-width: 640px) {
    .dc-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .dc-topbar__total {
        justify-content: space-between;
    }

    .dc-total-bar__amount {
        font-size: 20px;
    }

    .dc-options {
        grid-template-columns: 1fr;
    }
}