/* ============================================================
   Formulaire crédit V3 — Espace Crédits
   Design Typeform-like : full-screen, transitions latérales
   Charte : orange #E8652A · Poppins
   ============================================================ */

:root {
    --cf-orange:     #E8652A;
    --cf-orange-dk:  #cc5524;
    --cf-orange-lt:  #fdf1ec;
    --cf-orange-mid: #f4b899;
    --cf-text:       #111827;
    --cf-muted:      #6b7280;
    --cf-border:     #e5e8f0;
    --cf-bg:         #f8f9fc;
    --cf-white:      #ffffff;
    --cf-green:      #10b981;
    --cf-radius:     12px;
    --cf-radius-sm:  8px;
    --cf-shadow:     0 4px 24px rgba(13,15,28,0.07);
    --cf-font:       'Poppins', sans-serif;
    --header-h:      52px;
    --nav-h:         68px;
}

html, body {
    height: 100%;
    font-family: var(--cf-font);
    -webkit-font-smoothing: antialiased;
    background: var(--cf-white);
}

/* ============================================================
   ENVELOPPE PRINCIPALE
   ============================================================ */

#cf3-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 26px); /* minus test banner */
    background: var(--cf-white);
    overflow: hidden;
}

/* ============================================================
   EN-TÊTE
   ============================================================ */

#cf3-header {
    flex-shrink: 0;
    height: var(--header-h);
    border-bottom: 1px solid var(--cf-border);
    background: var(--cf-white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#cf3-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: calc(var(--header-h) - 3px);
}

#cf3-header-logo {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--cf-text);
    font-family: var(--cf-font);
    user-select: none;
    text-decoration: none;
    cursor: pointer;
}

#cf3-header-logo span { color: var(--cf-orange); }

#cf3-screen-counter {
    font-size: 11px;
    font-weight: 600;
    color: var(--cf-muted);
    letter-spacing: 0.5px;
}

#cf3-progress-bar {
    height: 3px;
    background: var(--cf-border);
    flex-shrink: 0;
}

#cf3-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--cf-orange);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 2px 2px 0;
}

/* ============================================================
   ZONE DES ÉCRANS
   ============================================================ */

#cf3-stage {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

/* ============================================================
   ÉCRANS — système de slides latérales
   ============================================================ */

.cf3-screen {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
    display: flex;
    transition: transform 0.44s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.44s ease;
}

.cf3-screen.screen-right  { transform: translateX(100%);  opacity: 0; }
.cf3-screen.screen-left   { transform: translateX(-100%); opacity: 0; }
.cf3-screen.screen-active { transform: translateX(0);     opacity: 1; pointer-events: auto; }

/* margin:auto centre verticalement quand le contenu rentre,
   et bascule en scroll-from-top quand l'ecran deborde (pas de clip) */
.cf3-screen-inner {
    max-width: 620px;
    width: 100%;
    margin: auto;
    padding: 40px 28px 100px;
}

/* ============================================================
   ÉCRAN 0 — ACCUEIL
   ============================================================ */

.cf3-welcome-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    padding-top: 32px;
    padding-bottom: 80px;
}

.cf3-welcome-logo {
    font-size: 13px;
    font-weight: 800;
    color: var(--cf-text);
    opacity: 0.4;
    margin-bottom: 36px;
}

.cf3-welcome-logo span { color: var(--cf-orange); opacity: 1; }

.cf3-welcome-title {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.15;
    color: var(--cf-text);
    margin-bottom: 18px;
}

.cf3-welcome-sub {
    font-size: 15px;
    font-weight: 300;
    color: var(--cf-muted);
    line-height: 1.7;
    margin-bottom: 28px;
}

.cf3-welcome-features {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 40px;
}

.cf3-welcome-features li {
    font-size: 13px;
    font-weight: 500;
    color: var(--cf-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cf3-check { color: var(--cf-green); font-weight: 700; }

.cf3-btn-start {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--cf-orange);
    color: #fff;
    border: none;
    border-radius: var(--cf-radius-sm);
    font-family: var(--cf-font);
    font-size: 15px;
    font-weight: 600;
    padding: 14px 32px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 16px rgba(232,101,42,0.30);
    margin-bottom: 14px;
}

.cf3-btn-start:hover {
    background: var(--cf-orange-dk);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232,101,42,0.38);
}

.cf3-btn-start:active { transform: scale(0.97); }

.cf3-enter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.22);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 13px;
}

.cf3-enter-hint {
    font-size: 12px;
    color: var(--cf-muted);
    font-weight: 300;
}

.cf3-enter-hint kbd {
    font-family: monospace;
    background: var(--cf-bg);
    border: 1px solid var(--cf-border);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 11px;
    color: var(--cf-text);
}

/* ============================================================
   QUESTIONS — styles communs
   ============================================================ */

.cf3-q-hint {
    font-size: 11px;
    font-weight: 600;
    color: var(--cf-orange);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.cf3-question {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 700;
    letter-spacing: -0.8px;
    color: var(--cf-text);
    line-height: 1.2;
    margin-bottom: 28px;
}

.cf3-q-accent { color: var(--cf-orange); }

/* ============================================================
   ÉCRAN 1 — MONTANT
   ============================================================ */

.cf3-amount-big {
    font-size: clamp(48px, 10vw, 68px);
    font-weight: 800;
    color: var(--cf-orange);
    letter-spacing: -3px;
    line-height: 1;
    margin-bottom: 6px;
}

.cf3-amount-sub {
    font-size: 12px;
    font-weight: 300;
    color: var(--cf-muted);
    margin-bottom: 24px;
}

.cf3-slider-wrap { margin-bottom: 32px; }

.cf3-slider {
    width: 100%;
    height: 5px;
    border-radius: 100px;
    background: var(--cf-border);
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    cursor: pointer;
    display: block;
}

.cf3-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--cf-white);
    border: 2.5px solid var(--cf-orange);
    box-shadow: 0 2px 10px rgba(232,101,42,0.30);
    cursor: pointer;
}

.cf3-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--cf-white);
    border: 2.5px solid var(--cf-orange);
    box-shadow: 0 2px 10px rgba(232,101,42,0.30);
    cursor: pointer;
}

.cf3-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--cf-muted);
    font-weight: 500;
    margin-top: 10px;
}

/* Montant exact (secondaire) */
.cf3-montant-exact-wrap {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px dashed var(--cf-border);
}

.cf3-montant-exact-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--cf-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cf3-montant-exact-row {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 200px;
}

.cf3-montant-exact-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--cf-border);
    border-radius: var(--cf-radius-sm);
    font-family: var(--cf-font);
    font-size: 15px;
    font-weight: 500;
    color: var(--cf-text);
    background: var(--cf-white);
    outline: none;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}
.cf3-montant-exact-input::-webkit-inner-spin-button,
.cf3-montant-exact-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.cf3-montant-exact-input:focus {
    border-color: var(--cf-orange);
}

.cf3-montant-exact-unit {
    font-size: 16px;
    font-weight: 600;
    color: var(--cf-muted);
    flex-shrink: 0;
}

.cf3-montant-exact-hint {
    font-size: 11px;
    color: var(--cf-muted);
    margin-top: 5px;
}

/* ---- */

.cf3-sim-badge {
    display: inline-block;
    background: var(--cf-orange-lt);
    border: 1px solid var(--cf-orange-mid);
    border-radius: 100px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--cf-orange);
    margin-top: 8px;
}

/* ============================================================
   CHIPS
   ============================================================ */

.cf3-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.cf3-chip {
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--cf-font);
    border: 1.5px solid var(--cf-border);
    background: var(--cf-white);
    color: var(--cf-muted);
    cursor: pointer;
    transition: all 0.14s ease;
    line-height: 1.2;
    white-space: nowrap;
    outline: none;
}

.cf3-chip:hover {
    border-color: var(--cf-orange-mid);
    color: var(--cf-orange);
    background: var(--cf-orange-lt);
}

.cf3-chip.selected {
    background: var(--cf-orange);
    border-color: var(--cf-orange);
    color: #fff;
    animation: cf3-chip-pop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cf3-chip-pop {
    0%   { transform: scale(0.90); }
    60%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.cf3-chips-small {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 20px;
}

.cf3-chip-sm {
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--cf-font);
    border: 1.5px solid var(--cf-border);
    background: var(--cf-white);
    color: var(--cf-muted);
    cursor: pointer;
    transition: all 0.14s ease;
    outline: none;
}

.cf3-chip-sm:hover {
    border-color: var(--cf-orange-mid);
    color: var(--cf-orange);
    background: var(--cf-orange-lt);
}

.cf3-chip-sm.selected {
    background: var(--cf-orange);
    border-color: var(--cf-orange);
    color: #fff;
    animation: cf3-chip-pop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.cf3-chips-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 6px;
    display: none;
}

.cf3-chips-error.visible { display: block; }

/* Bouton "Autres" : déplie la sélection secondaire */
.cf3-chip-autres {
    border-style: dashed;
    font-weight: 600;
}
.cf3-chip-autres.selected {
    background: var(--cf-orange-lt);
    border-color: var(--cf-orange);
    color: var(--cf-orange);
    border-style: solid;
}

/* Message carte d'identité expirée */
.cf3-echeance-warn {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--cf-orange-dk);
    background: var(--cf-orange-lt);
    border: 1px solid var(--cf-orange-mid);
    border-radius: var(--cf-radius-sm);
    padding: 10px 12px;
}

/* ============================================================
   CHAMPS DE FORMULAIRE
   ============================================================ */

.cf3-field { margin-bottom: 16px; }

.cf3-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cf-muted);
    margin-bottom: 7px;
}

.cf3-req { color: var(--cf-orange); }
.cf3-opt { font-size: 10px; font-weight: 400; color: var(--cf-muted); margin-left: 4px; text-transform: none; letter-spacing: 0; }

/* ============================================================
   INFOBULLES
   ============================================================ */

/* Ligne label + bouton ? */
.cf3-label-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
}
.cf3-label-row label {
    margin-bottom: 0;
    flex: 1;
}

/* Ligne checkbox + bouton ? */
.cf3-checkbox-tip-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Bouton ? */
.cf3-tip-btn {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--cf-orange);
    background: transparent;
    color: var(--cf-orange);
    font-size: 10px;
    font-weight: 700;
    font-family: var(--cf-font);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.cf3-tip-btn:hover,
.cf3-tip-btn.active {
    background: var(--cf-orange);
    color: var(--cf-white);
}

/* Tooltip global (position:fixed — non clippé par overflow) */
#cf3-tooltip-global {
    position: fixed;
    background: #1a1a2e;
    color: #fff;
    font-size: 12px;
    font-family: var(--cf-font);
    font-weight: 400;
    line-height: 1.55;
    padding: 10px 14px;
    border-radius: 8px;
    width: 240px;
    max-width: calc(100vw - 16px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    z-index: 9999;
    pointer-events: none;
}

.cf3-field input[type="text"],
.cf3-field input[type="number"],
.cf3-field input[type="email"],
.cf3-field input[type="tel"],
.cf3-field input[type="date"],
.cf3-field select {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--cf-border);
    border-radius: 10px;
    font-family: var(--cf-font);
    font-size: 15px;
    font-weight: 400;
    color: var(--cf-text);
    background: var(--cf-white);
    box-sizing: border-box;
    transition: border-color 0.18s, box-shadow 0.18s;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.cf3-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
}

.cf3-field input:focus,
.cf3-field select:focus {
    border-color: var(--cf-orange);
    box-shadow: 0 0 0 4px rgba(232,101,42,0.09);
}

.cf3-field input.cf-invalid,
.cf3-field select.cf-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239,68,68,0.07);
}

.cf3-field input.cf-valid,
.cf3-field select.cf-valid { border-color: #10b981; }

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

.cf3-field-inline { margin-bottom: 4px; }

.cf3-field-checkbox { margin-bottom: 18px; }

.cf3-checkbox-label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: var(--cf-text) !important;
    cursor: pointer;
    line-height: 1.6;
}

.cf3-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: var(--cf-orange);
    cursor: pointer;
    border: none;
    padding: 0;
}

/* ============================================================
   GRILLE
   ============================================================ */

.cf3-row { display: flex; gap: 14px; }
.cf3-row .cf3-field { flex: 1 1 0; min-width: 0; }

.cf3-field-num  { flex: 0 0 80px !important; }
.cf3-field-grow { flex: 1 1 0 !important; }
.cf3-field-cp   { flex: 0 0 120px !important; }

/* ============================================================
   SÉPARATEURS DE SECTION
   ============================================================ */

.cf3-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cf-orange);
    margin: 4px 0 16px;
}

.cf3-section-sep {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
}

.cf3-section-sep span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--cf-orange);
    white-space: nowrap;
}

.cf3-section-sep::before,
.cf3-section-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--cf-border);
}

/* ============================================================
   BADGE CRM PULSANT
   ============================================================ */

.cf3-crm-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 500;
    color: var(--cf-muted);
    margin-top: 20px;
    padding: 7px 14px;
    background: var(--cf-bg);
    border-radius: 100px;
    border: 1px solid var(--cf-border);
}

.cf3-crm-dot {
    width: 7px;
    height: 7px;
    background: var(--cf-green);
    border-radius: 50%;
    flex-shrink: 0;
    animation: cf3-dot-pulse 2.5s ease-in-out infinite;
}

@keyframes cf3-dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}

/* ============================================================
   CRÉDITS EN COURS
   ============================================================ */

.cf3-credit-block {
    background: var(--cf-bg);
    border: 1.5px solid var(--cf-border);
    border-radius: var(--cf-radius-sm);
    padding: 18px 20px;
    margin-bottom: 12px;
}

.cf3-credit-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--cf-text);
    margin-bottom: 12px;
}

/* ============================================================
   RÉCAP CARD (écran 14)
   ============================================================ */

.cf3-recap-card {
    background: linear-gradient(135deg, var(--cf-orange-lt) 0%, #fff9f6 100%);
    border: 1.5px solid var(--cf-orange-mid);
    border-radius: var(--cf-radius);
    padding: 24px 28px;
    margin-bottom: 28px;
}

.cf3-recap-amount {
    font-size: 40px;
    font-weight: 800;
    color: var(--cf-orange);
    letter-spacing: -1.5px;
    line-height: 1;
    margin-bottom: 6px;
}

.cf3-recap-details {
    font-size: 16px;
    font-weight: 600;
    color: var(--cf-text);
}

.cf3-recap-name {
    font-size: 13px;
    font-weight: 400;
    color: var(--cf-muted);
    margin-top: 4px;
}

.cf3-assurance-q {
    font-size: 16px;
    font-weight: 600;
    color: var(--cf-text);
    margin-bottom: 6px;
}

.cf3-assurance-hint {
    font-size: 12px;
    font-weight: 300;
    color: var(--cf-muted);
    margin-bottom: 16px;
    line-height: 1.7;
}

.cf3-summary-box {
    background: var(--cf-bg);
    border-left: 3px solid var(--cf-orange);
    border-radius: var(--cf-radius-sm);
    padding: 18px 22px;
    font-size: 13px;
    font-weight: 300;
    color: var(--cf-muted);
    line-height: 1.8;
}

/* ============================================================
   ÉCRAN 15 — MERCI
   ============================================================ */

.cf3-merci-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100%;
    padding-top: 32px;
    padding-bottom: 80px;
}

.cf3-merci-icon {
    width: 72px;
    height: 72px;
    background: var(--cf-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    margin-bottom: 28px;
    animation: cf3-merci-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.1s;
}

@keyframes cf3-merci-pop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.cf3-merci-title {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--cf-text);
    margin-bottom: 14px;
}

.cf3-merci-sub {
    font-size: 16px;
    font-weight: 300;
    color: var(--cf-muted);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 380px;
}

.cf3-merci-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 320px;
}

.cf3-merci-step {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--cf-text);
    background: var(--cf-bg);
    border-radius: var(--cf-radius-sm);
    padding: 12px 18px;
    border: 1.5px solid var(--cf-border);
    text-align: left;
}

.cf3-merci-num {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    background: var(--cf-orange);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf3-btn-home {
    display: inline-block;
    padding: 13px 28px;
    background: var(--cf-text);
    color: #fff;
    border-radius: var(--cf-radius-sm);
    font-family: var(--cf-font);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}

.cf3-btn-home:hover {
    background: #374151;
    transform: translateY(-1px);
}

/* ============================================================
   NAVIGATION FIXE
   ============================================================ */

#cf3-nav {
    flex-shrink: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: var(--cf-white);
    border-top: 1px solid var(--cf-border);
    z-index: 10;
    gap: 12px;
}

.cf3-nav-prev {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--cf-font);
    font-size: 13px;
    font-weight: 500;
    color: var(--cf-muted);
    background: transparent;
    border: 1.5px solid var(--cf-border);
    border-radius: var(--cf-radius-sm);
    padding: 10px 18px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.cf3-nav-prev:hover { border-color: var(--cf-text); color: var(--cf-text); }

#cf3-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

#cf3-keyboard-hint {
    font-size: 11px;
    color: var(--cf-muted);
    font-weight: 300;
    white-space: nowrap;
}

#cf3-keyboard-hint kbd {
    font-family: monospace;
    background: var(--cf-bg);
    border: 1px solid var(--cf-border);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 10px;
    color: var(--cf-text);
}

.cf3-nav-next,
.cf3-nav-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--cf-font);
    font-size: 14px;
    font-weight: 600;
    background: var(--cf-orange);
    color: #fff;
    border: none;
    border-radius: var(--cf-radius-sm);
    padding: 11px 26px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 3px 12px rgba(232,101,42,0.25);
    letter-spacing: -0.1px;
    flex-shrink: 0;
}

.cf3-nav-next:hover,
.cf3-nav-submit:hover {
    background: var(--cf-orange-dk);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(232,101,42,0.32);
}

.cf3-nav-next:active,
.cf3-nav-submit:active { transform: scale(0.97); }

.cf3-nav-next:disabled,
.cf3-nav-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.cf3-enter-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.20);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 12px;
}

/* Spinner inline dans les boutons */
.cf3-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cf3-spin 0.65s linear infinite;
    flex-shrink: 0;
}

@keyframes cf3-spin { to { transform: rotate(360deg); } }

/* ============================================================
   FEEDBACK ERREUR
   ============================================================ */

#cf3-feedback {
    position: fixed;
    bottom: calc(var(--nav-h) + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: #c53030;
    border-radius: var(--cf-radius-sm);
    padding: 11px 18px;
    font-size: 13px;
    font-family: var(--cf-font);
    font-weight: 400;
    box-shadow: var(--cf-shadow);
    max-width: calc(100vw - 48px);
    text-align: center;
    z-index: 20;
    animation: cf3-fb-in 0.2s ease both;
}

@keyframes cf3-fb-in {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {
    :root {
        --header-h: 48px;
        --nav-h: 62px;
    }

    .cf3-screen-inner { padding: 28px 20px 100px; }
    .cf3-welcome-inner { padding-top: 20px; }
    .cf3-question { margin-bottom: 22px; }
    .cf3-amount-big { font-size: 44px; letter-spacing: -2px; }

    .cf3-row { flex-direction: column; gap: 0; }
    .cf3-field-num, .cf3-field-cp { flex: 1 1 100% !important; }

    .cf3-chips-grid .cf3-chip { font-size: 12px; padding: 8px 14px; }

    .cf3-nav-next, .cf3-nav-submit { padding: 10px 20px; font-size: 13px; }
    #cf3-keyboard-hint { display: none; }
    #cf3-header-top { padding: 0 20px; }
    #cf3-nav { padding: 0 20px; }
}

@media (max-width: 400px) {
    .cf3-btn-start { width: 100%; justify-content: center; }
}
