/* Espace Client Crédit – Frontend */

.ecc-top-bar {
    max-width: 900px;
    margin: 0 auto 12px;
    display: flex;
    justify-content: flex-end;
}

.ecc-lang-switcher {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
}

.ecc-lang-switcher a.ecc-lang {
    color: #64748b;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.ecc-lang-switcher a.ecc-lang:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.ecc-lang-switcher a.ecc-lang.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    font-weight: 600;
}

.ecc-wrapper {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1e293b;
    line-height: 1.5;
}

.ecc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.ecc-header h2 {
    margin: 0;
    font-size: 1.6rem;
}

.ecc-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Tabs auth */
.ecc-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.ecc-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    color: #64748b;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.ecc-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

.ecc-tab-content {
    display: none;
}

.ecc-tab-content.active {
    display: block;
}

/* Cards */
.ecc-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ecc-card h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.25rem;
    color: #0f172a;
}

.ecc-card h4 {
    margin: 20px 0 12px;
    font-size: 1.05rem;
}

/* Forms */
.ecc-form .ecc-field {
    margin-bottom: 16px;
}

.ecc-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #334155;
}

.ecc-form input[type="text"],
.ecc-form input[type="email"],
.ecc-form input[type="password"],
.ecc-form input[type="number"],
.ecc-form input[type="file"],
.ecc-form select,
.ecc-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.ecc-form input:focus,
.ecc-form select:focus,
.ecc-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.ecc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .ecc-row {
        grid-template-columns: 1fr;
    }
}

.ecc-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

/* Buttons */
.ecc-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
}

.ecc-btn:active {
    transform: scale(0.98);
}

.ecc-btn-primary {
    background: #2563eb;
    color: #fff;
}

.ecc-btn-primary:hover {
    background: #1d4ed8;
}

.ecc-btn-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.ecc-btn-outline:hover {
    background: #f1f5f9;
}

.ecc-btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Messages */
.ecc-messages {
    margin: 12px 0;
    min-height: 0;
}

.ecc-messages .ecc-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 10px 14px;
    border-radius: 6px;
}

.ecc-messages .ecc-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 6px;
}

.ecc-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.ecc-info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.ecc-help {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 16px;
}

/* Table */
.ecc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.ecc-table th,
.ecc-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.ecc-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    width: 40%;
}

.ecc-table thead th {
    width: auto;
}

/* Badges */
.ecc-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.ecc-badge-en_attente {
    background: #fef3c7;
    color: #92400e;
}

.ecc-badge-approuve {
    background: #dcfce7;
    color: #166534;
}

.ecc-badge-refuse {
    background: #fee2e2;
    color: #991b1b;
}

.ecc-badge-en_cours {
    background: #dbeafe;
    color: #1e40af;
}

.ecc-badge-effectue {
    background: #d1fae5;
    color: #065f46;
}

.ecc-badge-a_venir {
    background: #f1f5f9;
    color: #475569;
}

.ecc-badge-paye {
    background: #dcfce7;
    color: #166534;
}

.ecc-badge-en_retard {
    background: #fee2e2;
    color: #991b1b;
}
