/* Front : champs personnalises sur fiche produit */

.tdc-cf-form {
    background: #fff8e7;
    border: 1px solid #d4dbe8;
    border-radius: 12px;
    padding: 0 24px 22px;
    margin: 24px 0;
    font-family: 'Manrope', sans-serif;
}

.tdc-cf-form .tdc-cf-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    background: #0F2044;
    margin: 0 -24px 20px;
    padding: 14px 24px;
    border-radius: 12px 12px 0 0;
}

.tdc-cf-field {
    margin-bottom: 16px;
}

.tdc-cf-field:last-child {
    margin-bottom: 0;
}

.tdc-cf-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1a1a1a;
    font-size: 0.95rem;
}

.tdc-cf-required {
    color: #b32d2e;
    margin-left: 2px;
}

.tdc-cf-price-info {
    display: inline-block;
    margin-left: 8px;
    background: #f97316;
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tdc-cf-field input[type="text"],
.tdc-cf-field textarea,
.tdc-cf-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tdc-cf-field input[type="text"]:focus,
.tdc-cf-field textarea:focus,
.tdc-cf-field select:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.tdc-cf-field textarea {
    resize: vertical;
    min-height: 70px;
}

.tdc-cf-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tdc-cf-radio-option {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 999px;
    font-weight: 400 !important;
    margin: 0 !important;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tdc-cf-radio-option input[type="radio"] {
    margin-right: 6px;
    cursor: pointer;
}

.tdc-cf-radio-option:hover {
    border-color: #f97316;
    background: #f0f3f9;
}

.tdc-cf-radio-option input[type="radio"]:checked + span {
    color: #f97316;
    font-weight: 600;
}

.tdc-cf-help {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 0.82rem;
    font-style: italic;
}

/* ===== File upload (v1.2) ===== */

.tdc-cf-file-wrap {
    background: #fff;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 12px;
    transition: border-color 0.2s, background 0.2s;
}

.tdc-cf-file-wrap:hover {
    border-color: #f97316;
    background: #f5f8ff;
}

.tdc-cf-file-wrap.tdc-cf-error {
    border-color: #b32d2e;
    background: #fff0f0;
}

.tdc-cf-file-input {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.tdc-cf-file-status {
    min-height: 22px;
    font-size: 0.85rem;
}

.tdc-cf-file-hint {
    color: #666;
    font-style: italic;
}

.tdc-cf-file-loading {
    color: #f97316;
    font-weight: 600;
}

.tdc-cf-file-loading::before {
    content: '⏳ ';
}

.tdc-cf-file-error {
    color: #b32d2e;
    font-weight: 600;
}

.tdc-cf-file-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #f5f8ff;
    border: 1px solid #c8d6ef;
    border-radius: 6px;
}

.tdc-cf-file-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fff;
}

.tdc-cf-file-icon {
    font-size: 28px;
    line-height: 1;
}

.tdc-cf-file-name {
    flex: 1;
    color: #0F2044;
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.tdc-cf-file-name:hover {
    text-decoration: underline;
}

.tdc-cf-file-remove {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #666;
    transition: all 0.2s;
}

.tdc-cf-file-remove:hover {
    border-color: #b32d2e;
    color: #b32d2e;
    background: #fff;
}

/* ===== Supplement badge + prix live (v1.2) ===== */

.tdc-cf-supplement-badge {
    display: inline-block;
    margin-left: 6px;
    background: #f97316;
    color: #fff;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5;
    vertical-align: middle;
}

.tdc-cf-price-live {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    background: #f97316;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.tdc-cf-price-live-label {
    flex: 1;
}

.tdc-cf-price-live-amount {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .tdc-cf-form {
        padding: 16px;
    }
    .tdc-cf-file-preview {
        flex-wrap: wrap;
    }
    .tdc-cf-radio-option {
        min-height: 44px;
    }
    .tdc-cf-supplement-badge {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
}
