/* ============================================================
   Diacité — Budget Participatif Module
   Colors: Blue #e27d60 | Gold #e27d60 | Font: Inter
   ============================================================ */

/* ---- Grid ---- */
.nxv-budget-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .nxv-budget-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ---- Card ---- */
.nxv-budget-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.nxv-budget-card:hover {
    box-shadow: 0 6px 24px rgba(0, 51, 102, 0.12);
    transform: translateY(-2px);
}

/* ---- Card Image Placeholder ---- */
.nxv-budget-card-img {
    height: 200px;
    background: linear-gradient(135deg, #e27d60 0%, #003366 60%, #e27d60 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nxv-budget-card-img .nxv-budget-icon {
    font-size: 56px;
    color: rgba(255, 255, 255, 0.25);
    font-weight: 700;
    user-select: none;
}

/* ---- Card Body ---- */
.nxv-budget-card-body {
    padding: 20px;
}

.nxv-budget-card-body h3 {
    margin: 0 0 12px;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

.nxv-budget-card-body .nxv-budget-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Meta Row (amount + quartier) ---- */
.nxv-budget-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.nxv-budget-amount {
    display: inline-flex;
    align-items: center;
    background: #f0ebe8;
    color: #c4633a;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #e27d60;
}

.nxv-budget-quartier {
    display: inline-flex;
    align-items: center;
    background: #EEF0FB;
    color: #e27d60;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ---- Progress Bar ---- */
.nxv-budget-progress {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.nxv-budget-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #e27d60, #003366);
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 2%;
}

/* ---- Votes Display ---- */
.nxv-budget-votes {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    margin-bottom: 14px;
}

.nxv-budget-votes span {
    color: #e27d60;
    font-weight: 700;
}

/* ---- Vote Button ---- */
.nxv-budget-vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #e27d60;
    border-radius: 8px;
    background: #e27d60;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nxv-budget-vote-btn:hover {
    background: #003366;
    border-color: #003366;
}

.nxv-budget-vote-btn.voted {
    background: #e27d60;
    border-color: #e27d60;
    color: #fff;
}

.nxv-budget-vote-btn.voted:hover {
    background: #d9a023;
    border-color: #d9a023;
}

.nxv-budget-vote-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---- Card Actions (Gestionnaire) ---- */
.nxv-budget-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.nxv-budget-card-actions button,
.nxv-budget-card-actions select {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.nxv-budget-card-actions button:hover,
.nxv-budget-card-actions select:hover {
    border-color: #e27d60;
}

/* ---- Bar Chart ---- */
.nxv-budget-chart {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-bottom: 24px;
}

.nxv-budget-chart h3 {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px;
}

.nxv-budget-chart-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nxv-budget-chart-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nxv-budget-chart-label {
    flex: 0 0 160px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .nxv-budget-chart-label {
        flex: 0 0 100px;
        font-size: 12px;
    }
}

.nxv-budget-chart-bar-wrap {
    flex: 1;
    height: 28px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.nxv-budget-chart-bar {
    height: 100%;
    background: linear-gradient(90deg, #e27d60, #003366);
    border-radius: 6px;
    transition: width 0.5s ease;
    min-width: 2%;
}

.nxv-budget-chart-value {
    flex: 0 0 50px;
    font-size: 13px;
    font-weight: 700;
    color: #e27d60;
}

/* ---- Stats Row ---- */
.nxv-budget-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .nxv-budget-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.nxv-budget-stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.nxv-budget-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #e27d60;
    line-height: 1.2;
}

.nxv-budget-stat-value.gold {
    color: #e27d60;
}

.nxv-budget-stat-label {
    font-size: 12px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
}

/* ---- Table ---- */
.nxv-budget-table-wrap {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    margin-bottom: 24px;
}

.nxv-budget-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.nxv-budget-table thead th {
    background: #f6f7fb;
    color: #333;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
}

.nxv-budget-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

.nxv-budget-table tbody tr:hover {
    background: #fafbff;
}

.nxv-budget-table .nxv-status-select {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
}

.nxv-budget-table .nxv-status-select:focus {
    outline: none;
    border-color: #e27d60;
    box-shadow: 0 0 0 2px rgba(0, 51, 102, 0.15);
}

/* ---- Toolbar ---- */
.nxv-budget-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.nxv-budget-toolbar .nxv-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    background: #e27d60;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.nxv-budget-toolbar .nxv-btn-primary:hover {
    background: #003366;
}

.nxv-budget-toolbar .nxv-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
    color: #e27d60;
    border: 2px solid #e27d60;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.nxv-budget-toolbar .nxv-btn-secondary:hover {
    background: #EEF0FB;
}

/* ---- Modal Form ---- */
.nxv-budget-form .nxv-form-group {
    margin-bottom: 16px;
}

.nxv-budget-form .nxv-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.nxv-budget-form .nxv-form-group input,
.nxv-budget-form .nxv-form-group textarea,
.nxv-budget-form .nxv-form-group select {
    width: 100%;
    padding: 10px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.nxv-budget-form .nxv-form-group input:focus,
.nxv-budget-form .nxv-form-group textarea:focus,
.nxv-budget-form .nxv-form-group select:focus {
    outline: none;
    border-color: #e27d60;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.nxv-budget-form .nxv-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.nxv-budget-form .nxv-form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    background: #e27d60;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.nxv-budget-form .nxv-form-submit:hover {
    background: #003366;
}
