/* CDS Bilans Public Verification Styles */

.cds-verification-container {
    max-width: 680px;
    margin: 40px auto;
    padding: 35px 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cds-verification-header {
    text-align: center;
    margin-bottom: 30px;
}

.cds-verification-icon {
    margin-bottom: 12px;
}

.cds-verification-header h2 {
    color: #1d2327;
    font-size: 26px;
    margin-bottom: 10px;
    font-weight: 700;
}

.cds-verification-header p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* Form */
.cds-verification-form {
    margin-bottom: 20px;
}

.cds-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.cds-input-wrapper {
    display: flex;
    gap: 10px;
}

.cds-input-wrapper input {
    flex: 1;
    padding: 12px 16px;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 2px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}

.cds-input-wrapper input:focus {
    border-color: #00ABFA;
    box-shadow: 0 0 0 3px rgba(0, 171, 250, 0.15);
}

.cds-btn-verify {
    padding: 12px 28px;
    background: #00ABFA;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.cds-btn-verify:hover {
    background: #0090d6;
}

.cds-btn-verify:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Help text */
.cds-help-text {
    display: block;
    margin-top: 6px;
    color: #888;
    font-size: 12px;
}

/* Inline format error */
.cds-inline-error {
    margin-top: 6px;
    color: #d9534f;
    font-size: 13px;
    font-weight: 500;
}

/* Input error state */
.cds-input-wrapper input.cds-input-error {
    border-color: #d9534f;
}

.cds-input-wrapper input.cds-input-error:focus {
    box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.15);
}

/* Loading */
.cds-verification-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 15px;
}

.cds-loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cds-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ddd;
    border-top-color: #00ABFA;
    border-radius: 50%;
    animation: cds-spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* Result card */
.cds-verification-result {
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    animation: cds-fadeIn 0.3s ease-in;
}

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

.cds-result-header {
    background: #f0f6fc;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cds-result-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1d2327;
}

.cds-result-body {
    padding: 0;
}

.cds-result-row {
    display: flex;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.cds-result-row:last-child {
    border-bottom: none;
}

.cds-result-row:nth-child(even) {
    background: #fafafa;
}

.cds-result-label {
    flex: 0 0 200px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.cds-result-value {
    flex: 1;
    font-size: 15px;
    color: #1d2327;
}

.cds-result-value.cds-montant {
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.cds-result-value.cds-resultat-positif {
    color: #2e7d32;
}

.cds-result-value.cds-resultat-negatif {
    color: #c62828;
}

/* Status badges */
.cds-public-statut {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.cds-public-statut.en_attente { background: #f0ad4e; }
.cds-public-statut.valide { background: #5cb85c; }
.cds-public-statut.refuse { background: #d9534f; }
.cds-public-statut.expire { background: #999; }

/* Warning (incoherence) */
.cds-verification-warning {
    margin: 0;
    padding: 12px 20px;
    background: #fff3cd;
    border-bottom: 1px solid #ffc107;
    color: #856404;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* Error */
.cds-verification-error {
    margin-top: 20px;
    padding: 16px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #d9534f;
    border-radius: 6px;
    color: #991b1b;
    font-size: 15px;
    animation: cds-fadeIn 0.3s ease-in;
}

/* Rate limited error */
.cds-verification-error.cds-rate-limited {
    border-left-color: #f0ad4e;
    background: #fff8e1;
    color: #856404;
}

/* New search button */
.cds-btn-new-search {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.cds-btn-new-search:hover {
    background: #e0e0e0;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .cds-verification-container {
        margin: 15px;
        padding: 20px;
    }

    .cds-input-wrapper {
        flex-direction: column;
    }

    .cds-input-wrapper input {
        font-size: 16px;
    }

    .cds-btn-verify {
        width: 100%;
    }

    .cds-result-row {
        flex-direction: column;
        gap: 4px;
    }

    .cds-result-label {
        flex: none;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}
