.dix-klaviyo-form {
    overflow: hidden;
    max-width: 100%;
}

.dix-kf-slider {
    position: relative;
    transition: height 0.4s ease;
    overflow: hidden;
}

.dix-kf-step {
    width: 100%;
    box-sizing: border-box;
    padding: 4px 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Seule l'étape active est visible et dans le flux */
.dix-kf-step:not(.dix-kf-step--active) {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}

.dix-kf-step--active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
}

/* Étape 1 : champ email + bouton */
.dix-kf-field {
    display: flex;
    gap: var(--spacing-3, 0.75rem);
    align-items: stretch;
}

.dix-kf-input {
    flex: 1;
    padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);
    font-size: var(--font-size-base, 1rem);
    color: var(--color-text, #1a1a1a);
    background-color: var(--color-bg, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-md, 8px);
    transition: border-color 200ms ease, box-shadow 200ms ease;
    outline: none;
}

.dix-kf-input:focus {
    border-color: var(--color-primary, #1e3a8a);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

.dix-kf-input::placeholder {
    color: var(--color-text-muted, #999);
}

/* Boutons */
.dix-kf-btn {
    white-space: nowrap;
    padding: var(--spacing-3, 0.75rem) var(--spacing-6, 1.5rem);
    font-size: var(--font-size-base, 1rem);
    font-weight: var(--font-weight-medium, 500);
    border: none;
    border-radius: var(--radius-lg, 12px);
    cursor: pointer;
    background-color: var(--color-primary, #1e3a8a);
    color: var(--color-text-inverse, #fff);
    transition: all 200ms ease;
}

.dix-kf-btn:hover {
    background-color: var(--color-primary-hover, #1a3278);
}

.dix-kf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Étape 2 : listes */
.dix-kf-subtitle {
    font-size: var(--font-size-lg, 1.125rem);
    font-weight: var(--font-weight-medium, 500);
    margin-bottom: var(--spacing-4, 1rem);
    color: var(--color-text, #1a1a1a);
}

.dix-kf-lists {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3, 0.75rem);
    margin-bottom: var(--spacing-4, 1rem);
}

.dix-kf-list-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-3, 0.75rem);
    padding: var(--spacing-3, 0.75rem) var(--spacing-4, 1rem);
    background: var(--color-bg, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    transition: border-color 200ms ease, background 200ms ease;
    font-size: var(--font-size-base, 1rem);
}

.dix-kf-list-option:hover {
    border-color: var(--color-primary, #1e3a8a);
    background: rgba(30, 58, 138, 0.04);
}

.dix-kf-list-option input[type="checkbox"] {
    accent-color: var(--color-primary, #1e3a8a);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.dix-kf-list-option span {
    flex: 1;
    color: var(--color-text, #1a1a1a);
}

/* Erreur */
.dix-kf-error {
    color: #d63638;
    font-size: var(--font-size-sm, 0.875rem);
    margin-top: var(--spacing-2, 0.5rem);
    margin-bottom: 0;
}

/* Étape 3 : confirmation */
.dix-kf-success {
    text-align: center;
    font-size: var(--font-size-lg, 1.125rem);
    color: var(--color-success, #00a32a);
    font-weight: var(--font-weight-medium, 500);
    padding: var(--spacing-4, 1rem) 0;
    animation: dixKfFadeIn 0.4s ease;
}

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

/* ==========================================================================
   FOOTER CONTEXT
   ========================================================================== */

.footer-newsletter .dix-klaviyo-form {
    width: 100%;
}

/* Étape 1 : input blanc + bouton contrasté */
.footer-newsletter .dix-kf-input {
    background-color: var(--color-bg, #fff);
    border: 2px solid transparent;
    border-radius: var(--radius-lg, 12px);
    color: var(--color-text, #1a1a1a);
}

.footer-newsletter .dix-kf-input:focus {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.footer-newsletter .dix-kf-btn {
    background-color: #ffffff;
    color: #1a1a1a;
    border-radius: var(--radius-lg, 12px);
    font-weight: var(--font-weight-semibold, 600);
}

.footer-newsletter .dix-kf-btn:hover {
    background-color: rgba(255, 255, 255, 0.85);
}

/* Étape 2 : textes blancs sur fond coloré */
.footer-newsletter .dix-kf-subtitle {
    color: #ffffff;
}

.footer-newsletter .dix-kf-list-option {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.footer-newsletter .dix-kf-list-option:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.footer-newsletter .dix-kf-list-option span {
    color: #ffffff;
}

.footer-newsletter .dix-kf-list-option input[type="checkbox"] {
    accent-color: #ffffff;
}

.footer-newsletter .dix-kf-btn--confirm {
    background-color: #ffffff;
    color: #1a1a1a;
    font-weight: var(--font-weight-semibold, 600);
}

.footer-newsletter .dix-kf-btn--confirm:hover {
    background-color: rgba(255, 255, 255, 0.85);
}

/* Erreur : texte visible sur fond coloré */
.footer-newsletter .dix-kf-error {
    color: #fff3cd;
}

/* Étape 3 : confirmation blanche */
.footer-newsletter .dix-kf-success {
    color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
    .dix-kf-field {
        flex-direction: column;
    }

    .dix-kf-btn {
        width: 100%;
    }
}
