/* --- Boutons Valider/Refuser (style pro minimal) --- */
.action-icon {
    width: 32px;
    height: 32px;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    background: #fff;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 4px;
    padding: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.action-icon svg {
    width: 18px;
    height: 18px;
}
.action-icon:hover,
.action-icon:focus {
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}
.valider-btn:hover,
.valider-btn:focus {
    color: #16a34a;
    border-color: #86efac;
    background: #f0fdf4;
}
.refuser-btn:hover,
.refuser-btn:focus {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}
/* Style hérité de reservation.html pour harmoniser le tableau des réservations commerciales dans index.html */

#table-reservations-commerciales, #table-reservations-commerciales th, #table-reservations-commerciales td {
    border-collapse: collapse;
    border: none;
}
#table-reservations-commerciales th, #table-reservations-commerciales td {
    padding: 12px 18px;
    white-space: nowrap;
    font-size: 1.08em;
}
#table-reservations-commerciales {
    table-layout: auto;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,86,179,0.07);
}
@media (max-width: 1000px) {
    #table-reservations-commerciales th, #table-reservations-commerciales td {
        padding: 8px 6px;
        font-size: 1em;
    }
}

/* --- Style du registre appliqué --- */
/* --- Tableau Réservations Commerciales --- */

/* === TABLEAU RESERVATIONS COMMERCIALES (STYLE CAPTURE) === */
#reservations-table, .table-reservations-commerciales {
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    font-size: 0.9em;
    border-collapse: collapse;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,86,179,0.07);
    margin-top: 10px;
    overflow: hidden;
}
#reservations-table thead, .table-reservations-commerciales thead {
    background: #343a40;
    color: #fff;
}
#reservations-table th, .table-reservations-commerciales th {
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 9px 10px;
    border-bottom: 1.5px solid #dee2e6;
    font-size: 0.95em;
    vertical-align: middle;
    background: #343a40;
    color: #fff;
}
#reservations-table td, .table-reservations-commerciales td {
    padding: 8px 10px;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.95em;
    vertical-align: middle;
}
.trace-col {
    white-space: nowrap;
}
#reservations-table tbody tr:nth-child(even),
.table-reservations-commerciales tbody tr:nth-child(even) {
    background: #f8f9fa;
}
#reservations-table tbody tr:hover,
.table-reservations-commerciales tbody tr:hover {
    background: #e2e6ea;
}
/* Montants alignés à droite, monospace, couleur selon signe */
#reservations-table td.montant-col, .table-reservations-commerciales td.montant-col {
    text-align: right !important;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.98em;
}
#reservations-table td.montant-col.positif, .table-reservations-commerciales td.montant-col.positif {
    color: #198754;
}
#reservations-table td.montant-col.negatif, .table-reservations-commerciales td.montant-col.negatif {
    color: #dc3545;
}
/* Actions (crayon, poubelle) */
.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    transition: background 0.15s;
    font-size: 1.13em;
    margin: 0 2px;
    vertical-align: middle;
    line-height: 1;
}
.action-btn.edit {
    color: #fd7e14;
}
.action-btn.edit:hover {
    background: #fff3cd;
}
.action-btn.delete {
    color: #343a40;
}
.action-btn.delete:hover {
    background: #f8d7da;
}
.action-btn svg {
    width: 1.1em;
    height: 1.1em;
    vertical-align: middle;
}
/* Responsive */
@media (max-width: 1000px) {
    #reservations-table th, #reservations-table td,
    .table-reservations-commerciales th, .table-reservations-commerciales td {
        padding: 7px 5px;
        font-size: 0.98em;
    }
}
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.btn-action {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.1rem;
    margin: 0 5px;
    transition: transform 0.2s;
}
.btn-action:hover {
    transform: scale(1.2);
}

.reservations-top-row {
    display: flex;
    align-items: stretch;
    gap: 16px;
    margin-top: 12px;
    margin-bottom: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.reservations-top-row > * {
    min-width: 0;
}

.reservations-side-column {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.reservations-side-column > * {
    min-width: 0;
}

.kpi-admin-page {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px 22px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.kpi-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.kpi-admin-title {
    margin: 0 0 4px 0;
    font-size: 1.4rem;
    color: #0f172a;
}

.kpi-admin-period {
    color: #475569;
    font-weight: 600;
}

.kpi-admin-status {
    color: #64748b;
    font-size: 0.9rem;
}

.kpi-admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.kpi-admin-actions .btn-secondary {
    padding: 8px 14px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.kpi-admin-actions .btn-secondary:hover,
.kpi-admin-actions .btn-secondary:focus {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

/* --- Validation en masse modal --- */
.res-modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    z-index: 10000;
    padding: 20px;
}

.res-modal-backdrop.show {
    display: flex;
}

.res-modal-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 4px solid #16a34a;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.res-modal-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #0f172a;
}

.res-modal-card p {
    margin: 0 0 16px 0;
    color: #475569;
    font-weight: 500;
}

.res-modal-card strong {
    color: #16a34a;
}

.res-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#res-validate-all-cancel,
#res-validate-all-confirm {
    padding: 8px 14px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}

#res-validate-all-cancel {
    border-color: transparent;
    background: transparent;
    color: #64748b;
}

#res-validate-all-cancel:hover,
#res-validate-all-cancel:focus {
    background: transparent;
    border-color: transparent;
    color: #1f2937;
    box-shadow: none;
    transform: translateY(-1px);
}

#res-validate-all-confirm {
    color: #16a34a;
    border-color: #86efac;
    background: #f0fdf4;
}

#res-validate-all-confirm:hover,
#res-validate-all-confirm:focus {
    color: #15803d;
    border-color: #4ade80;
    background: #dcfce7;
    box-shadow: 0 6px 14px rgba(34, 197, 94, 0.18);
    transform: translateY(-1px);
}

.kpi-admin-select {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    font-weight: 600;
    color: #1f2937;
}

.kpi-admin-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.kpi-admin-chart {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    margin: 12px 0 16px;
    height: 220px;
}

.kpi-admin-subtitle {
    font-weight: 700;
    color: #1f2a44;
    margin-bottom: 4px;
}

.kpi-admin-scope {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.kpi-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.kpi-admin-tile {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.kpi-admin-tile::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 4px;
    height: calc(100% - 24px);
    border-radius: 4px;
    background: linear-gradient(180deg, #1d4ed8 0%, #38bdf8 100%);
}

.kpi-admin-list-tile::before {
    background: linear-gradient(180deg, #0f766e 0%, #22c55e 100%);
}

.kpi-admin-label {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
}

.kpi-admin-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 4px 0 8px;
}

.kpi-admin-subvalue {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.kpi-admin-emphasis {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 6px;
}

.kpi-admin-helper {
    color: #64748b;
    font-size: 0.85rem;
}

.kpi-admin-list {
    margin-top: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kpi-admin-list > div {
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.kpi-admin-list > div:last-child {
    border-bottom: none;
}

@media (max-width: 900px) {
    .kpi-admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .kpi-admin-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

.envelope-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #d6dde8;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    flex-wrap: wrap;
    flex: 0 0 400px;
    width: 100%;
    min-width: 380px;
    max-width: 400px;
    box-sizing: border-box;
}

#prev-projete-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d8e2ff;
    background: linear-gradient(135deg, #f5f8ff 0%, #eef4ff 100%);
    box-shadow: 0 4px 10px rgba(29, 78, 216, 0.07);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#prev-projete-panel[data-tone='critical'] {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fff5f5 0%, #feecec 100%);
    box-shadow: 0 10px 22px rgba(185, 28, 28, 0.12);
}

#prev-projete-panel[data-tone='warning'] {
    border-color: #fde68a;
    background: linear-gradient(135deg, #fffbeb 0%, #fff5d9 100%);
    box-shadow: 0 10px 22px rgba(180, 83, 9, 0.12);
}

#prev-projete-panel[data-tone='positive'] {
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4 0%, #e9fbea 100%);
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.1);
}

.prev-projete-head {
    grid-area: head;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.prev-projete-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.prev-projete-kicker-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prev-projete-title-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.prev-projete-kicker {
    font-size: 0.62rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.prev-projete-title {
    font-size: 0.82rem;
    color: #0f172a;
    font-weight: 800;
}

.prev-projete-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 0.64rem;
    font-weight: 800;
    border: 1px solid transparent;
    white-space: nowrap;
}

.prev-projete-badge.is-neutral {
    color: #334155;
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.prev-projete-badge.is-positive {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}

.prev-projete-badge.is-warning {
    color: #92400e;
    background: #fef3c7;
    border-color: #fcd34d;
}

.prev-projete-badge.is-critical {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}

.prev-projete-main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
}

.prev-projete-main-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#prev-projete-val {
    font-size: 0.95rem;
    line-height: 1.15;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

#prev-projete-panel[data-tone='critical'] #prev-projete-val {
    color: #b91c1c;
}

#prev-projete-panel[data-tone='warning'] #prev-projete-val {
    color: #b45309;
}

#prev-projete-panel[data-tone='positive'] #prev-projete-val {
    color: #15803d;
}

.prev-projete-helper {
    font-size: 0.62rem;
    line-height: 1.2;
    color: #475569;
}

.prev-projete-impact {
    grid-area: impact;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #dbe4ff;
    border-radius: 7px;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.prev-projete-impact-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.prev-projete-impact-title {
    font-size: 0.68rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.prev-projete-impact-ratio {
    font-size: 0.72rem;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.prev-projete-impact-track {
    display: flex;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #dbe3f8;
    background: #eef2ff;
}

.prev-projete-impact-seg {
    height: 100%;
    min-width: 0;
    transition: width 0.25s ease;
}

.prev-projete-impact-seg.is-confirme {
    background: #1d4ed8;
}

.prev-projete-impact-seg.is-attente {
    background: #dc2626;
}

.prev-projete-impact-seg.is-projete {
    background: #16a34a;
}

.prev-projete-impact-seg.is-projete.is-negative {
    background: #b91c1c;
}

.prev-projete-impact-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.prev-projete-impact-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.59rem;
    color: #475569;
    font-weight: 700;
    white-space: nowrap;
}

.prev-projete-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.prev-projete-dot.is-confirme {
    background: #1d4ed8;
}

.prev-projete-dot.is-attente {
    background: #dc2626;
}

.prev-projete-dot.is-projete {
    background: #16a34a;
}

.prev-projete-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 6px;
}

.prev-projete-metrics--all {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.prev-projete-metric {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dbe4ff;
    border-radius: 7px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.prev-projete-metric .prev-projete-badge {
    width: fit-content;
    margin-top: 2px;
}

.prev-projete-metric-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.prev-projete-metric-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

#prev-confirme-val {
    color: #1d4ed8;
}

#prev-impact-attente-val {
    color: #b91c1c;
}

.prev-projete-metric-hint {
    font-size: 0.65rem;
    color: #64748b;
}

.envelope-title {
    font-weight: 700;
    color: #1f2a44;
    font-size: 1rem;
}

.envelope-info {
    width: 100%;
}

.envelope-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    font-weight: 600;
    color: #1f2a44;
    width: 100%;
}

.envelope-label {
    color: #475569;
    font-weight: 600;
    font-size: 0.88rem;
}

.envelope-metrics div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.envelope-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.envelope-auto-config {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.envelope-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.envelope-auto-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.78rem;
    color: #166534;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
}

.envelope-auto-status.off {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.envelope-threshold-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
}

.envelope-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.envelope-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.envelope-switch-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.envelope-switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transition: transform 0.2s ease;
}

.envelope-switch input:checked + .envelope-switch-slider {
    background: #16a34a;
}

.envelope-switch input:checked + .envelope-switch-slider::before {
    transform: translateX(20px);
}

.envelope-switch input:focus-visible + .envelope-switch-slider {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25);
}

#envelope-threshold-input {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    width: 130px;
    font-weight: 600;
    text-align: right;
}

#envelope-threshold-input:disabled {
    background: #f8fafc;
    color: #94a3b8;
}

#envelope-input {
    flex: 1 1 220px;
    min-width: 0;
}

#envelope-set-btn {
    min-width: 110px;
}

.reservations-filters {
    display: grid;
    grid-template-columns: repeat(7, minmax(96px, 150px));
    justify-content: start;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #d6dde8;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    box-sizing: border-box;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.reservations-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: stretch;
    min-width: 0;
}

.reservations-filters .filter-group label {
    font-size: 0.74rem;
    font-weight: 600;
    color: #475569;
}

.reservations-filters .filter-group input,
.reservations-filters .filter-group select {
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.8rem;
    background: #fff;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#res-filter-date-start,
#res-filter-date-end {
    max-width: none;
}

#res-filter-statut {
    max-width: none;
}

#res-filter-min,
#res-filter-max {
    max-width: none;
}

#res-filter-commercial,
#res-filter-client {
    max-width: none;
}

.reservations-filters .filter-group.filter-wide {
    align-items: stretch;
}

#res-filter-search {
    width: 100%;
    min-width: 170px;
    max-width: 100%;
}

.reservations-filters .filter-wide {
    grid-column: span 7;
}

.reservations-filters .filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-column: 1 / -1;
}

.filter-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
}

.filter-actions-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.envelope-summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #eef2ff;
    border: 1px solid #d6e0ff;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 700;
    color: #0f3d7a;
    white-space: nowrap;
    margin-right: 0;
    margin-left: auto;
}

@media (max-width: 1100px) {
    .filter-actions-group {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

#res-reinsert-btn {
    padding: 9px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f766e;
    font-weight: 700;
    cursor: pointer;
    width: auto;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}
        margin-left: auto;

#res-reinsert-btn:hover,
#res-reinsert-btn:focus {
    background: #f0fdfa;
    border-color: #99f6e4;
    color: #0f766e;
    box-shadow: 0 6px 14px rgba(13, 148, 136, 0.18);
    transform: translateY(-1px);
}

#res-validate-all-btn {
    padding: 9px 14px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font-weight: 700;
    cursor: pointer;
    width: auto;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}

#res-validate-all-btn:hover,
#res-validate-all-btn:focus {
    background: #f0fdf4;
    border-color: #86efac;
    color: #16a34a;
    box-shadow: 0 6px 14px rgba(34, 197, 94, 0.18);
    transform: translateY(-1px);
}

#res-validate-all-btn:disabled {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

@media (max-width: 1100px) {
    .reservations-top-row {
        flex-direction: column;
    }
    .reservations-side-column {
        width: 100%;
    }
    .envelope-bar {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
    #prev-projete-panel {
        min-width: 0;
        max-width: none;
        padding: 8px;
    }
    .reservations-filters {
        grid-template-columns: repeat(4, minmax(110px, 1fr));
        width: 100%;
    }
    .reservations-filters .filter-wide {
        grid-column: span 4;
    }
}

@media (max-width: 700px) {
    .reservations-filters {
        grid-template-columns: 1fr 1fr;
    }
    .reservations-filters .filter-wide {
        grid-column: span 2;
    }
    .prev-projete-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .prev-projete-impact-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .prev-projete-impact-legend {
        flex-wrap: wrap;
        overflow: visible;
    }
    .prev-projete-metrics {
        grid-template-columns: 1fr;
    }
}

.envelope-info {
    font-weight: 600;
    color: #1f2a44;
}

.envelope-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

#envelope-input {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    min-width: 220px;
    font-weight: 600;
    text-align: right;
}

#envelope-set-btn {
    padding: 8px 14px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}

#envelope-set-btn:hover,
#envelope-set-btn:focus {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}
