/* ===== Page ===== */
.page {
    min-height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    background: #2a5d66;
}

/* ===== Carte centrale ===== */
.card {
    width: 100%;
    max-width: 900px;
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 30px 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    /* box-shadow: 0 14px 32px rgba(0,0,0,0.06); */
}

/* ===== Titre ===== */
.card h1 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: #111827;
}

/* ===== Tableau ===== */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #fafafa;
    border: 1px solid #e6e8ec;
}

/* Lignes */
tr {
    border-bottom: 1px solid #e6e8ec;
}

tr:last-child {
    border-bottom: none;
}

/* Cellules */
th,
td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
    border: 1px solid #e6e8ec;
    background: #f9fafb;
}

/* En-têtes */
th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    /* background: #f5f6f8; */
}

/* ===== Inputs dans tableau ===== */
table input[type="text"] {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e6e8ec;
}

/* ===== Select ===== */
select {
    margin-bottom: 20px;
}

/* ===== Actions ===== */
.actions {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    flex-wrap: wrap;
}

/* ===== Boutons ===== */
button {
    padding: 11px 22px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

/* Primaire */
button[name="save"] {
    background: #7b8cff;
    color: #fff;
}

button[name="save"]:hover {
    box-shadow: 0 8px 18px rgba(123,140,255,0.35);
}

/* Secondaire */
button[type="button"] {
    background: #eef0f3;
    color: #374151;
}

/* Danger */
button.delete {
    background: #fde2e2;
    color: #b91c1c;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .card {
        padding: 20px;
        border-radius: 16px;
    }

    table,
    tr,
    th,
    td {
        display: block;
    }

    th {
        background: none;
        padding-bottom: 4px;
    }
}
/* Toast container */
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-6px);
    transition: all 0.35s ease;
}

/* Succès */
.toast.success {
    background: #eef7f1;
    color: #1f7a55;
    border: 1px solid #cfe9dc;
}

/* Suppression */
.toast.danger {
    background: #fff1f1;
    color: #a33a3a;
    border: 1px solid #f0caca;
}

/* Visible */
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Icône */
.toast .icon {
    font-size: 16px;
}
.confirm-box {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.25);
    backdrop-filter: blur(4px);
    z-index: 9998;
}

.confirm-box > div {
    background: #fff;
    padding: 20px 24px;
    border-radius: 16px;
    min-width: 280px;
    text-align: center;
    animation: pop .25s ease;
}

@keyframes pop {
    from { transform: scale(.95); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}


.confirm-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.confirm-actions button {
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.confirm-actions .danger {
    background: #f2bcbc;
    color: #7a1f1f;
}

.confirm-actions .cancel {
    background: #eaeaea;
    color: #444;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
